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
The only way to force a numeric zero instead of a NULL is to alter the table. Don't allow NULL's in the field and set a default
value of 0. However, you then lose the ability to determine is a value was actually entered or if 0 was entered. Don't know if that
matter to you.
Otherwise, you can u
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