Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 How to change decimal format dot(.) to comma(,) in

Author  Topic 

mast80864
Starting Member

4 Posts

Posted - 2013-02-07 : 06:04:29
Hi

We have production server in Iceland and it follows decimal format as "," example 12,23

But we have staging server with "en-US" settings in India and stores the value as 12.23

Now we need to change the format in staging and development machines to make same as production server to avoid issues in dev. environment.

Thanks
Mastan

Thanks
Mastan

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-07 : 06:09:10
you dont need to do this change in table. This is a presentation requirement which should be done at your front end application. Application languages have set of formatting functions build in to perform these tasks

Trying to implement this in SQL is ugly as it would require datatype conversions which will cause unwanted overheads when you use this data for manipulations like sorting,comparison etc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

mast80864
Starting Member

4 Posts

Posted - 2013-02-07 : 06:26:42
quote:
Originally posted by visakh16

you dont need to do this change in table. This is a presentation requirement which should be done at your front end application. Application languages have set of formatting functions build in to perform these tasks

Trying to implement this in SQL is ugly as it would require datatype conversions which will cause unwanted overheads when you use this data for manipulations like sorting,comparison etc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/





Thanks for your quick reply.

As of now we are doing it application level. But few issues we are not able to find until build moved to prodction since staging server is with "en-US" as defult and working perfect. To avoid these issue I want to change configuration of SQL SERVER Instance. I have tried it changing collation property(exactly production server database collation) of Database by recreating and restore DB option, still issue remains same.

Thanks
Mastan
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-02-07 : 06:35:14
what are those issues? can you illustrate?
Changing collation wont change existing data. it will only affect newly added data.

So far as your base fields are numeric datatypes i don't think so you'll face any issues in comparing them regardless of their formats. The issue can happen only when you do processing outside of sql server ie in application or at front end

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

jcarrallo
Starting Member

35 Posts

Posted - 2014-07-17 : 12:28:50
Hi,
Did you solve yoru problem?
I have exactly the same issue.
Many thanks,
Jay
Go to Top of Page
   

- Advertisement -