dbTalk Databases Forums  

SQL Management Studio and regional settings

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss SQL Management Studio and regional settings in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
stefan.jansen@hagstofa.is
 
Posts: n/a

Default SQL Management Studio and regional settings - 07-29-2008 , 04:03 AM






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

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Management Studio and regional settings - 07-29-2008 , 04:29 PM






(stefan.jansen (AT) hagstofa (DOT) is) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #3  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Management Studio and regional settings - 07-29-2008 , 04:29 PM



(stefan.jansen (AT) hagstofa (DOT) is) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #4  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Management Studio and regional settings - 07-29-2008 , 04:29 PM



(stefan.jansen (AT) hagstofa (DOT) is) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #5  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Management Studio and regional settings - 07-29-2008 , 04:29 PM



(stefan.jansen (AT) hagstofa (DOT) is) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #6  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Management Studio and regional settings - 07-29-2008 , 04:29 PM



(stefan.jansen (AT) hagstofa (DOT) is) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #7  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Management Studio and regional settings - 07-29-2008 , 04:29 PM



(stefan.jansen (AT) hagstofa (DOT) is) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #8  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Management Studio and regional settings - 07-29-2008 , 04:29 PM



(stefan.jansen (AT) hagstofa (DOT) is) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #9  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Management Studio and regional settings - 07-29-2008 , 04:29 PM



(stefan.jansen (AT) hagstofa (DOT) is) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #10  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Management Studio and regional settings - 07-29-2008 , 04:29 PM



(stefan.jansen (AT) hagstofa (DOT) is) writes:
Quote:
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 (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.