Sweet... thanks guys... it is working well now :-).
On 4/8/07, Mogens Melander <[EMAIL PROTECTED]> wrote:
Well, maybe you want to read up on isnull() and case (..) in the manual.
It's in there, somewhere.
mysql> SELECT CASE 1 WHEN 1 THEN 'one'
-> WHEN 2 THEN 'two' ELSE 'more' END;
Well, maybe you want to read up on isnull() and case (..) in the manual.
It's in there, somewhere.
mysql> SELECT CASE 1 WHEN 1 THEN 'one'
-> WHEN 2 THEN 'two' ELSE 'more' END;
-> 'one'
mysql> SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' END;
-> 'true'
mysql> SELECT CASE BI
John Kopanas wrote:
I have a query that looks something like this:
SELECT (c_o_w_inst_rev - c_o_w_estcost)/c_o_w_inst_rev
FROM tmpGovernmentSummaries
The problem is that sometimes c_o_w_inst_rev is 0 and dividing by zero
returns a NULL.
If c_o_w_inst_rev == 0 how can I return 0 for the SELECT
I have a query that looks something like this:
SELECT (c_o_w_inst_rev - c_o_w_estcost)/c_o_w_inst_rev
FROM tmpGovernmentSummaries
The problem is that sometimes c_o_w_inst_rev is 0 and dividing by zero
returns a NULL.
If c_o_w_inst_rev == 0 how can I return 0 for the SELECT above instead
of NULL