Welcome to dbForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

SQL Management Studio and regional settings

 
   Database Forums (Home) -> Tools RSS
Next:  Concatenating variables of type "text" ..  
Author Message
stefan.jansen

External


Since: Jul 29, 2008
Posts: 1



(Msg. 1) Posted: Tue Jul 29, 2008 2:03 am
Post subject: SQL Management Studio and regional settings
Archived from groups: microsoft>public>sqlserver>tools (more info?)

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

 >> Stay informed about: SQL Management Studio and regional settings 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 1649



(Msg. 2) Posted: Tue Jul 29, 2008 2:29 pm
Post subject: Re: SQL Management Studio and regional settings [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

(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.
> Anyone else experienced similar problems and/or now a solution to this
> problem.

I reported this during the beta of SQL 2005, and the bug was closed as
"by design". I think the underlying problem is in SqlClient.

There is also the question of what result do we really want? That is,
do we want the comma or the period? I think I prefer the point, because
that works when I paste into a query window. Then again, comma works
better when you paste into Excel.


--
Erland Sommarskog, SQL Server MVP, esquel DeleteThis @sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 >> Stay informed about: SQL Management Studio and regional settings 
Back to top
Login to vote
bass_player

External


Since: Jun 20, 2008
Posts: 9



(Msg. 3) Posted: Wed Jul 30, 2008 11:05 am
Post subject: Re: SQL Management Studio and regional settings [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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

wrote in message

> 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
 >> Stay informed about: SQL Management Studio and regional settings 
Back to top
Login to vote
Aaron Bertrand [SQL Serve

External


Since: Jun 15, 2005
Posts: 632



(Msg. 4) Posted: Wed Jul 30, 2008 11:05 am
Post subject: Re: SQL Management Studio and regional settings [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> 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
 >> Stay informed about: SQL Management Studio and regional settings 
Back to top
Login to vote
bass_player

External


Since: Jun 20, 2008
Posts: 9



(Msg. 5) Posted: Thu Jul 31, 2008 3:56 pm
Post subject: Re: SQL Management Studio and regional settings [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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. Sad

"Aaron Bertrand [SQL Server MVP]" wrote in message

>> 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
>
 >> Stay informed about: SQL Management Studio and regional settings 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
2005 Management Studio vs EM - In EM, I could see the members of a Windows group by going through most of the process of creating a new login. After you select a Windows group, the "Members..." button becomes active on the New Login window, allowing you to view the member...

SQL Management Studio 2005 - Why does the rendering of SQL Management Studio 2005 take forever when my monitor runs in portrait mode? If I rotate the monitor in landscape mode the tool responds and performs just fine. The .NET 2003 and the old SQL IDE work just fine in portrait..

SQL Server Management Studio - Is it possible to delete a group of stored procedure in one action, as it was using the mmc in SQL2000 ? Or do I have to delete each store proc one at a time ???

where is SQL Server Management Studio? - Hi, I've installed SQL Server 2005 Dev and VS 2005 pro. I just can't find SQL Server Management Studio from the menu start-> programs-> SQL Server 2005. Can you help me? Thank you.

SQL Management Studio with SQL 2005 behind Firewall - I'm having some difficulties with remote management of our SQL server which resides behind our firewall. I'm trying to connect using the tools from my local station but it does not return the server state, so I cannot start/stop SQL and I also cannot....
   Database Forums (Home) -> Tools All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]