Reputation: 43
SQL Server displays decimal separator as a comma instead of a dot, so the generated script couldn't be executed.
Upvotes: 4
Views: 23578
Reputation: 11883
This SQL demonstrates how to use the culture parameter of the Format function:
declare @f float = 123456.789;
select
[raw] = str(@f,20,3)
,[standard] = cast(format(@f, 'N', 'en-US') as varchar(20))
,[European] = cast(format(@f, 'N', 'de-de') as varchar(20))
yields
raw standard European
-------------------- -------------------- --------------------
123456.789 123,456.79 123.456,79
Upvotes: 6