Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> CASE expression
As part of a somewhat simple SELECT statement, I am attempting the case
expression below on an Oracle server and am getting an Oracle error
stating "Error signaled in parallel query server. Invalid number".
Here's the expression:
CASE
WHEN VARIABLE_A = 'R' THEN 0
WHEN VARIABLE_A = 'C' THEN
NVL(NUMBER_1,0)+NVL(NUMBER_2,0)
END AS TOTAL
The idea is I only want to sum numbers 1 and 2 when variable A = 'C'.
If its 'R' then I want TOTAL to be 0. Am I missing something?
Received on Tue Dec 05 2006 - 19:19:15 CST