SQL Management Studio and regional settings
  Home FAQ Contact Sign in
microsoft.public.sqlserver.tools only
 
Advanced search
POPULAR GROUPS

more...

microsoft ... sqlserver.tools Profile…
 Up
SQL Management Studio and regional settings         


Author: stefan.jansen
Date: Jul 29, 2008 02:03

I'm Running SQL 2005 and Microsoft SQL Server Management Studio
(9.00.3042.00) and experiencing strange behaviour when results from my
queries are displayed.

My regional settings are set to Icelandic (comma as decimal separator
and dot as thousand separators). Running the following queries

SELECT CAST(5 AS NUMERIC(5,2)) / CAST(2 AS NUMERIC(5,2))
SELECT 5.0 / 2.0
SELECT CAST(5 AS float)/ CAST(2 AS float)

Give me following results

2.50000000
2.500000
2,5

Only the last one gives me the result according to my regional
settings.
Anyone else experienced similar problems and/or now a solution to this
problem.

Stefan
4 Comments
Re: SQL Management Studio and regional settings         


Author: Erland Sommarskog
Date: Jul 29, 2008 14:29

(stefan.jansen@hagstofa.is) writes:
> I'm Running SQL 2005 and Microsoft SQL Server Management Studio
> (9.00.3042.00) and experiencing strange behaviour when results from my
> queries are displayed.
>
> My regional settings are set to Icelandic (comma as decimal separator
> and dot as thousand separators). Running the following queries
>
> SELECT CAST(5 AS NUMERIC(5,2)) / CAST(2 AS NUMERIC(5,2))
> SELECT 5.0 / 2.0
> SELECT CAST(5 AS float)/ CAST(2 AS float)
>
> Give me following results
>
> 2.50000000
> 2.500000
> 2,5
>
> Only the last one gives me the result according to my regional
> settings. ...
Show full article (1.35Kb)
no comments
Re: SQL Management Studio and regional settings         


Author: bass_player
Date: Jul 29, 2008 20:05

Regional settings apply to the server side. In my case, running a query from
my client to the server does not reflect the regional setting but it does
when I do the same on the server
Show full article (0.98Kb)
no comments
Re: SQL Management Studio and regional settings         


Author: Aaron Bertrand [SQL Server MVP]
Date: Jul 29, 2008 20:58

> Regional settings apply to the server side.

Only if you are running the client on the server. If you are using
Management Studio on your workstation and connecting to a remote server, the
local workstation's regional settings (not the server's) influence a lot of
the output in your local tool.

A
no comments
Re: SQL Management Studio and regional settings         


Author: bass_player
Date: Jul 31, 2008 00:56

Thanks for the clarification, Aaron. I forgot to mention the effects of
Excel on the client-side querying the server. Apparently, we can't use the
client tools on my workstation to connect to the servers. :-(

"Aaron Bertrand [SQL Server MVP]" wrote in message
news:C4B55F21.DB3A%%ten.xoc@dnartreb.noraa...
>> Regional settings apply to the server side.
>
> Only if you are running the client on the server. If you are using
> Management Studio on your workstation and connecting to a remote server,
> the
> local workstation's regional settings (not the server's) influence a lot
> of
> the output in your local tool.
>
> A
>
no comments

RELATED THREADS
SubjectArticles qty Group
Setting permissions in User Security tab is reverting back to previous settingmicrosoft.public.windows.server.active_directory ·