August 23, 2005 at 9:50 am
How can I get the decimal separtor from SQL Server? Is it stored in any system table.
August 23, 2005 at 9:51 am
I'm confused,
What do you mean by the decimal separator?
August 23, 2005 at 9:52 am
Like, how do I get if the separator is . or ,
August 23, 2005 at 11:49 am
SQL Server always expects . as decimal seperator.
Language settings affects system messages & datetime formatting.
See "languages, supported" in the books online
RayM,
Some countries, like Belgium, use 1,5 instead of 1.5 for one and a half.
August 23, 2005 at 12:07 pm
haritha - are you talking about numbers and currencies ?!?! this is locale specific...- in QA under tools - options - there is a box for regional setting for numbers, currencies etc...and/or you could configure your regional settings on the control panel...?!?!
hope at least one response has come close to what you're looking for!!!
**ASCII stupid question, get a stupid ANSI !!!**
August 23, 2005 at 2:15 pm
Thanks all for the replies. Here is what I am looking for.
We have a database that needs to be supported for multiple languages. Based on the Client locale, the decimal separator needs to be displayed correctly on the Web forms. When the application saves back the data, it needs to send the data in correct format (with the decimal separator either . or , ) How will the application know how to get the decimal separator from SQL Server while saving the data?
August 23, 2005 at 2:23 pm
haritha - this is more of a display issue than a storage/saving one...as i said in my post you can change the regional settings based on the locale....
why don't you "play around" with these settings and see what you get ?! I know that if the regional settings are changed and then the QA option is set to reflect the regional settings, you get the results back the way you want...
**ASCII stupid question, get a stupid ANSI !!!**
August 23, 2005 at 2:51 pm
in the odbc data source administrator - you can configure to "use regional settings when outputting currency, numbers, dates and times"...
**ASCII stupid question, get a stupid ANSI !!!**
August 23, 2005 at 2:56 pm
Sushila,
Outputting data format is not the problem.
Here is an Example. 2 people login to the database. On the form, there is a float field, that displays 56,45 for a German person and 56.45 for an English person. When they modify the value and save, what value(format) should be sent to the SQL Server for saving. Will both formats be saved in the SQL Server. Does SQL Server have internal format of . as the decimal separator?
Thanks a lot for looking into this
August 23, 2005 at 3:15 pm
You should be sending the value as a correctly typed parameter. That way you use the web server's settings to parse the input and create a typed value, then supply that to SQL Server.
August 23, 2005 at 3:21 pm
haritha - you cannot dictate how sql server stores your values internally - the only thing you have control over is how it is displayed - so if your column is a decimal datatype and the regional settings and odbc configuration are set to display a comma separator, then your result will be 56,45 - if a decimal separator, you will get 56.45....
the best way to test this is to change the regional settings and see the outputted results..your results are based on the settings - NOT on how sql server saves them....
**ASCII stupid question, get a stupid ANSI !!!**
August 23, 2005 at 3:23 pm
chris...correctly typed can be a bit confusing...I'm sure you mean the right data type and not that there aren't any typos?!?!
**ASCII stupid question, get a stupid ANSI !!!**
August 24, 2005 at 12:00 am
Hmm, yes of course. Is it not at all possible to say it that way in English, or was it just that in that context it could be interpreted the wrong way?
August 24, 2005 at 2:32 am
Chris the problem is that it coult be mis-interpreted. As written it is correct but could be confusing in this context.
Mike
August 24, 2005 at 2:54 am
Ok, good, then my English was not as bad as I feared.
Viewing 15 posts - 1 through 15 (of 37 total)
You must be logged in to reply to this topic. Login to reply