Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Administering
»
Decimal symbol
Decimal symbol
Rate Topic
Display Mode
Topic Options
Author
Message
JanR
JanR
Posted Monday, March 02, 2009 4:31 AM
Ten Centuries
Group: General Forum Members
Last Login: Monday, April 08, 2013 4:09 AM
Points: 1,111,
Visits: 114
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
Post #666466
Dugi
Dugi
Posted Monday, March 02, 2009 6:39 AM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, April 02, 2013 1:48 AM
Points: 1,252,
Visits: 3,367
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/
Post #666552
JanR
JanR
Posted Monday, March 02, 2009 7:02 AM
Ten Centuries
Group: General Forum Members
Last Login: Monday, April 08, 2013 4:09 AM
Points: 1,111,
Visits: 114
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.
Post #666572
Dugi
Dugi
Posted Monday, March 02, 2009 7:36 AM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, April 02, 2013 1:48 AM
Points: 1,252,
Visits: 3,367
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/
Post #666599
JanR
JanR
Posted Monday, March 02, 2009 11:22 PM
Ten Centuries
Group: General Forum Members
Last Login: Monday, April 08, 2013 4:09 AM
Points: 1,111,
Visits: 114
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.
Post #667049
jan.nooitgedagt
jan.nooitgedagt
Posted Wednesday, June 16, 2010 8:21 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, July 29, 2010 3:41 AM
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 ?
Post #938222
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.