Re: HELP: SQL SELECT
Date: 1995/10/17
Message-ID: <460huh$ihl_at_netope.harvard.edu>#1/1
tkyte_at_us.oracle.com (Thomas J Kyte) wrote:
>"Beth J. Katcher" <katcher_at_a1.tch.harvard.edu> wrote:
> . . .
>>select card_no from pt_code
>>where diag_cod = '621.100'
>> and card_no in (select card_no from pt_code where diag_cod = '303.500')
>> and card_no in (select card_no from pt_code where diag_cod = '339.000');
>
. .
>Or how about:
>
>select card_no from pt_cod
>where diag_cod in ( '621.100', '303.500', '339.000' )
>group by card_no
>having count(*) = 3
>/
> . . .
select card_no
(select unique card_no, diag_cod
from pt_code
where (card_no, diag_cod) in
from pt_code
where diag_cod in ('621.100', '303.500', '339.000'))
group by card_no
Beth Received on Tue Oct 17 1995 - 00:00:00 CET
