Reputation: 193
I found out: if I do a
select Artikelnummer,Listenpreis*1.19 as money from [SL_M03KNE].[dbo].[ARKALK]
i get: 5,59
If i do a
EXEC master..xp_cmdshell 'bcp "select Artikelnummer,Listenpreis*1.19 as money from [SL_M03KNE].[dbo].[ARKALK]" queryout "D:\shop\xml\Artikelpreise_ohne.csv" -E -c -T -x
i found in the csv File the Value 5.59
the bcp do a conversion from the komma to dot. How can i do it that the original 5,59 was insert in the csv?
Upvotes: 1
Views: 1068
Reputation: 238048
By default, bcp
ignores regional settings. From SQL Server 2012, you can use bcp -R
to honor regional settings.
If you are using an older version of SQL Server, consider formatting the output in your query. For example, use replace
to change dots to commas:
select replace(convert(varchar(50), Listenpreis*1.19), '.', ',')
Upvotes: 1