Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Decimal symbol


Decimal symbol

Author
Message
JanR
JanR
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1910 Visits: 122
Hi,

can I set up SQL Server 2005 decimal symbol which has been different from Windows system regional options decimal symbol?
I didn't find answer at SQL books.

Tx
Dugi
Dugi
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1316 Visits: 3511
Why you are going to change the decimal symbol?

============================================================
SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
http://www.sqlservercentral.com/articles/Best+Practices/61537/
JanR
JanR
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1910 Visits: 122
We need the same decimal symbol at different databases, but we can't set up or modify regional option.
I'm trying to solve this problem with database settings.
Dugi
Dugi
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1316 Visits: 3511
I don't have any info that you can do it with SQL Server database settings, SQL Server doesn't change its behavior depending on regional settings in this case the decimal symbol!

But you can retrieve the data from database with REPLACE Function like here:

DECLARE @N VARCHAR(12)
SET @N = '123456,789100'
SET @N = REPLACE(@N, ',','.')
SELECT @N


===

Reverse option:

DECLARE @M VARCHAR(12)
SET @M = '123456.789100'
SET @M = REPLACE(@M, '.',',')
SELECT @M


OR

just use the Replace Function on the field where you have the number with decimals like

SELECT REPLACE(YOUR_FIELD, ',', '.')

You can change , or . and vice-versa!

============================================================
SELECT YOUR PROBLEM FROM SSC.com WHERE PROBLEM DESCRIPTION =
http://www.sqlservercentral.com/articles/Best+Practices/61537/
JanR
JanR
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1910 Visits: 122
When I use SQL Function REPLACE, I have to create function or procedure. I know about this way, but I don't want to use it.

It's a pity that SQL Server isn't able to do with database settings.

Thanks for your answer.
jan.nooitgedagt
jan.nooitgedagt
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 14
I Have the same question.

We have servers with SQL-server2000 wich use, display a comma ',' for a decimal seperator.

The same tables/fields wich are imported on another server with SQL-server2008 displays it with a decimal point '.'

Why ???

Has SQL-server changed that in version 2008 ???
Or can i configure it for example during installation ?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search