Re: Problem with NULL values
Posted in 2000
Obnoxio The Clown — — source: Informix-list mailing list archive (1991-1998)
From: "Colin Thu" <ly-cong.thu@pp.inet.fi>
>
>Dear friends!
And me, I assume.
>I have some problem with my Query (SQL). It's about NULL values.
>
>SELECT ordernro, quantity, sent, (quantity - sent ) as 'q_left'
>FROM orders>
>So, If sent = NULL then (quatity - sent) is not "quantity". It'll become
>NULL too. So, I need the real value for "q_left".
SELECT orderno, quantity, sent, (quantity - NVL(sent, 0)) AS 'q_left'
FROM orders
?
>Thanks for people =P
Yes, what would we do without them?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com