PRB: SQL Server Returns English Format for Numeric Data Regardless of the Collation Settings (811036)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)

SYMPTOMS

SQL Server returns data in English format when you retrieve money data type or real data type from a table. The table can have any collation settings.

CAUSE

SQL Server stores the numeric data only in one format regardless of the collation setting or language version. With money, real, or float data types, data is stored in binary format based on the specified precision.

WORKAROUND

The client application should format data according to the settings of the client computer locale.

In SQL Query Analyzer, use the following example to format money data type in French format:
Use Northwind 

GO

SELECT unitprice EnglishFormat, replace (replace (cast(unitprice as varchar), ',', ''), '.', ',') FrenchFormat 
FROM  [Order Details]

The output of formatted data is in French format.

STATUS

This behavior is by design.

MORE INFORMATION

To have SQL Query Analyzer use the format settings from the regional settings of the client computer:
  1. Start SQL Query Analyzer.
  2. On the Tools menu, click Options.
  3. On the Connections tab, click to select Use regional settings when displaying currency, number, dates, and times.
If you change this attribute, the Microsoft OLE DB Provider for ODBC gives priority to the client locale setting when it converts date, time, and currency values to character strings at the statement level.

REFERENCES

For additional information, visit the following Microsoft Web site and see the "SQL_SOPT_SS_REGIONALIZE" topic: For more information about how to write international Transact-SQL statements, visit the following Microsoft Web site:
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

229690 HOWTO: Set the ASP Locale ID Per the Browser's Language Settings


Modification Type:MajorLast Reviewed:10/3/2003
Keywords:kbSQLProg kbDeployment kbprb KB811036 kbAudDeveloper