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.
| Author |
Topic |
|
takeover
Starting Member
1 Post |
Posted - 2003-07-11 : 10:50:21
|
| Hi,I am very new to SQL Server. There is a multilingual application we are developing. I have a question. When I am querying my database, there are numbers with decimal points. In languages like German, the decimal points are coming as comma. How can I explicitly tell the application to display the output like that. Do I need to declare something before executing the sql? Is there any commands which can execute before executing the sql(select) which will change the output according to the language?Any help is really appreciated.Sun |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-07-11 : 12:15:56
|
| Are you using unicode datatypes?nchar, nvarchar ntext?When you say the decimals are coming out as commas, do you mean in numeric fields?I'm not sure, but one way to change something in SQL is REPLACESELECT REPLACE(col1,',','.') FROM mytableWill display all commas as decimalsHTHBrett8-) |
 |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2003-07-12 : 03:15:35
|
| Brett, I dont think REPLACE will help him, look at how numbers are formatted in various ways: $ 1,123.45... CP 1.123,45You see if you replace the commas with periods, then what do you do with the periods? I think its completely a presentation layer problem.Sun:I think you are confusing a presentation issue with a storage issue. How data is stored internally in or retreived from SQL Server is not the problem here. Regardless of how SQL Server retreives data, you should be able to display dates, numbers and currencies in localized formats outside of the database. This depends on what you are using as your front end. If you are using a Windows application, the format of currencies and numbers is influenced by Locale Settings of the computer the program is being run on. In .NET programs the locale can be set per thread or form as well, so it can be independent of machine settings. If you are running a web application, you can set the locale for each session or page (IIS 5.1 and above). Look up LCID in the documentation.Owais |
 |
|
|
|
|
|
|
|