Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: CASE expression
On 06.12.2006 02:19, April wrote:
> 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?
You are missing the ELSE branch. That might be the cause.
robert Received on Wed Dec 06 2006 - 04:30:54 CST
![]() |
![]() |