DECODE / CASE Question
- From: "amerar@xxxxxxx" <amerar@xxxxxxx>
- Date: Fri, 30 May 2008 10:51:01 -0700 (PDT)
Hi,
Say we have a very long DECODE statement like this:
DECODE(2,-99999,0,2) + DECODE(5,-99999,0,5) + DECODE(7,-99999,0,7) -
DECODE(8,-99999,0,8) * DECODE(9,-99999,0,9) stuff
Pardon the use of real numbers, that was for testing.
Now, I want to basically say if the value of this is 0, then 0 should
be returned, otherwise the result of the math should be returned.
Can I use a case statement for this somehow? Or do I enclose it
around another DECODE? Can I use the generated column alias???
Thanks!
.
- Follow-Ups:
- Re: DECODE / CASE Question
- From: fitzjarrell@xxxxxxx
- Re: DECODE / CASE Question
- Prev by Date: Re: RAC srvctl /bin/java not found
- Next by Date: Re: SpamDBPro. Ver 2.5
- Previous by thread: RAC srvctl /bin/java not found
- Next by thread: Re: DECODE / CASE Question
- Index(es):