SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Convert nulls to blanks
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

marcusn25
Yak Posting Veteran

Germany
51 Posts

Posted - 01/24/2014 :  07:09:09  Show Profile  Reply with Quote
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)

Singapore
17650 Posts

Posted - 01/24/2014 :  08:16:32  Show Profile  Reply with Quote
This should be done in your client application. Doing it in SQL means, you are returning string to the application instead of decimals


KH
Time is always against us

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000