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

How can i force a 0 in a SQL query?

From: Miguel Pinto <j-miguel-pinto_at_telecom.pt>
Date: 27 Jan 1999 12:57:37 GMT
Message-ID: <01be49f4$9bb6d110$c4d14090@wspc0117>


Hi experts,

In a sql query like this:

select group_client, count(*)
from client_bills
where bill like '1000%'
group by group_client

I just get in the output, the group_client that acomplish the condition bill like '1000%'.
But what i need is to get all group_client and force a 0 to all other groups that don't acomplish the condition. I'v tried nvl() and decode() but nothing works.

Some help will be greattly appreciated
Thanks in advance

Regards
Miguel Pinto Received on Wed Jan 27 1999 - 06:57:37 CST

Original text of this message

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