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

Home -> Community -> Usenet -> c.d.o.server -> SQL Puzzle

SQL Puzzle

From: Eric <ebektech_at_videotron.ca>
Date: Mon, 16 Aug 1999 13:05:32 GMT
Message-ID: <01bee7e6$9aaee4c0$9521330a@w15-1429.rmoc.on.ca>


I am trying to find diff alternatives to resolve the following:

I have the following 2 tables:

CLIENT
client_id
...

PROGRAM
client_id
program_id
effective_date
...

A client can have multiple programs... Now, I need to write a query for a client to find:

If the client has no programs or all the programs are not equal 8 then, the query should return 'Not 8', client_id.....

If the client has all programs equal to 8 then, the query should return 'All 8', client_id.....

Only one row should be returned for each client.

Thanks Received on Mon Aug 16 1999 - 08:05:32 CDT

Original text of this message

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