Home » SQL & PL/SQL » SQL & PL/SQL » check for null (10g)
check for null [message #396351] Mon, 06 April 2009 04:43 Go to next message
ajitpal.s
Messages: 204
Registered: November 2006
Senior Member
Hi,

Is there any easier way to replace the null values for a particular field with zero?

So far i have came across with either using case or decode like below. It gets abit messy if i use it everywhere in the sql.

decode(field1,null,0,field1)


Re: check for null [message #396352 is a reply to message #396351] Mon, 06 April 2009 04:46 Go to previous messageGo to next message
trivendra
Messages: 208
Registered: October 2007
Location: Noida, India
Senior Member
You Can use NVL function.

Thanks
Trivendra
Re: check for null [message #396354 is a reply to message #396352] Mon, 06 April 2009 04:49 Go to previous message
ajitpal.s
Messages: 204
Registered: November 2006
Senior Member
thank you
Previous Topic: Date Function
Next Topic: Primary and Foreign Key
Goto Forum:
  


Current Time: Sat Dec 03 07:47:22 CST 2016

Total time taken to generate the page: 0.07981 seconds