Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2013-03-28 : 22:51:59
|
I am trying to convert this decimal(10,2) that brings 1233,00to $ 1233,00 (or any other money sign).If i do this :moneytbl.moneysign + ' ' + (CONVERT(nvarchar(50),convert(money,operations.amount))) as price I get $ 1233.00 so instead of a comma i get a dot.Any help?Thanks. |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-03-29 : 00:36:53
|
replace dot(.) with comma(,)--exampleDECLARE @numtest as DECIMAL(10,3)SET @numtest = 123.456SELECT @numtest -- decimal with dotSELECT REPLACE(CONVERT(VARCHAR(13), @numtest), '.', ',') -- String with comma |
|
|
sapator
Constraint Violating Yak Guru
462 Posts |
Posted - 2013-03-29 : 19:58:25
|
Thanks. |
|
|
|
|
|