Decimal symbol

  • 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

  • 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/[/url]

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

  • 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/[/url]

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

  • 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 ?

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply