September 29, 2010 at 3:50 am
Hi all,
If i run this sql sentence:
select CONVERT(decimal (10,6),'1,5')
I receive 'Msg 8114, Level 16, State 5, Line 1'
Error converting data type varchar to numeric.
But if i run the next:
select CONVERT(decimal (10,6),'1.5')
It run correctly. The only difference is the decimal point separator. With ',' (coma) it failed, but with '.' (point) run correctly.
How i can use the ',' decimal separator when convert varchar to decimal? Is there any option or in sql server i only can convert from varchar to decimal using '.' (point) decimal separator?
Many thanks in advance.
September 29, 2010 at 4:07 am
unfortunately it is not supported .
You will have to use replace to convert to the 'us-english' standard on using a fullstop.
Vote up this item
http://connect.microsoft.com/SQLServer/feedback/details/126363/escape-character-for-decimal-point
September 29, 2010 at 4:16 am
Thanks Dave.
September 29, 2010 at 4:30 am
This was removed by the editor as SPAM
September 29, 2010 at 4:35 am
Thanks all for your help.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply