Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How can i force a 0 in a SQL query?
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