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 |
marcusn25
Yak Posting Veteran
56 Posts |
Posted - 2014-01-24 : 07:09:09
|
Hi,
I would like to ammend Nulls to blanks for a decimal field to be as follows
Before ammending.
8502072|571090.90|NULL|4468.65|NULL|NULL|0.00
Once ammended, it should be as follows
8502072|571090.90||4468.65|||0.00
My script
Convert(decimal(17,2),NULLIF( Customer.amount,''))
Customer.amount field Declared as Decimal (17,2)
Thank you in advance.
Marcus
I learn something new everyday. |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-01-24 : 08:16:32
|
This should be done in your client application. Doing it in SQL means, you are returning string to the application instead of decimals
KH [spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|