Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Sum on like wildcard - replacing decode statement

Sum on like wildcard - replacing decode statement

From: <bbcrock_at_gmail.com>
Date: 8 Jun 2005 12:47:51 -0700
Message-ID: <1118260071.566116.222680@g47g2000cwa.googlegroups.com>


I need to replace a decode statement with some other process.

currently the old DBA's code reads:
sum(decode(status 'PENDING', 1, 0)) PENDING

We added several new "PENDING" entries. I need to rewrite it as: sum(decode(status 'PENDING%', 1, 0)) PENDING

decode fails here. Does anyone have a working example of a case statement or similar code?

thanks,

Don Received on Wed Jun 08 2005 - 14:47:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US