Link to home
Start Free TrialLog in
Avatar of Stephan_Schrandt
Stephan_SchrandtFlag for Germany

asked on

Decimal delimiter in TSQL

Hello again,

another problem occurs when importing some data into a table. Steps I do:

1. Import CSV file into dataset (VB.NET)
2. Use dataset.getxml method to retrieve XML string.
3. Call stored procedure that selects the fields of XML parameter

The parameter is passed as XML, the content of the XML parameter is attached and the stored proc can be viewed in the code section. The problem is that the numbers are wrong formatted, TSQL sees the point as decimal delimiter. E.g. the value 2.946 is imported as 2,95. This shouldn't happen (image of regional settings attached). Of course I could replace the point, but the productive system is an english version, so that's no option for me.
Btw. all software products I use in development are german versions.

rs.GIF
getxml.txt
SOLUTION
Avatar of tigin44
tigin44
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Stephan_Schrandt

ASKER

Yes, but I have a german version of SQL Server and german regional settings (development environment).  Does SQL Server always treat point as decimal seperator ignoring regional settings?
No matter which locale (regional setting) you use, and whether it is a German or US English version of MSSQL, they behave the same. Only difference is for default codepage used for collations.