Re: Get a Numeric Zero instead of NULL in SELECT

2006-08-14 Thread Michael Stassen
Asif Lodhi wrote: Hi, I have a query: INSERT INTO tmp2 (x) SELECT ((t3.m * 100) + b.id) AS x2 FROM tmp3 t3 LEFT JOIN (SELECT (MAX(x) - ((MAX(x) div 100) * 100)) + 1 AS pid FROM tmp2 WHERE (x div 100) = 2147 HAVING (MAX(x) - ((MAX(x) div 1

Re: Get a Numeric Zero instead of NULL in SELECT

2006-08-10 Thread Brent Baisley
e already using a HAVING filter. - Original Message - From: "Asif Lodhi" <[EMAIL PROTECTED]> To: Sent: Thursday, August 10, 2006 6:14 AM Subject: Get a Numeric Zero instead of NULL in SELECT Hi, I have a query: insert into tmp2 (x) select ((t3.m * 100)+b.id ) as x2 from

Re: Get a Numeric Zero instead of NULL in SELECT

2006-08-10 Thread Asif Lodhi
Hi, I am replying to my own post to tell you that now I am using CASE WHEN {condition} THEN END construct to check for NULL and returning numeric ZERO. On the face of it, CASE doesn't seem to be function - it's an operator - isn't? However, I would now like to ask you

Get a Numeric Zero instead of NULL in SELECT

2006-08-10 Thread Asif Lodhi
Hi, I have a query: insert into tmp2 (x) select ((t3.m * 100)+b.id ) as x2 fromtmp3 t3 LEFT JOIN (select ((max(x)) - ((max(x) div 100) * 100))+1 as pid from tmp2 where ((x div 100)=2147)