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 -> Re: How can i force a 0 in a SQL query?

Re: How can i force a 0 in a SQL query?

From: Miguel Pinto <j-miguel-pinto_at_telecom.pt>
Date: 27 Jan 1999 16:56:54 GMT
Message-ID: <01be4a16$08b52de0$c4d14090@wspc0117>


JoeZ53 wrote:
> select group_client, sum (decode (substr (substr (bill, 1, 4), '1000', 1,
0))
> from client_bills
> group by group_client;

Excelent Joe.
It works like this:
..., sum (decode (substr (bill, 1, 4), '1000', 1, 0))

Thanks for your precious help.

Miguel Pinto Received on Wed Jan 27 1999 - 10:56:54 CST

Original text of this message

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