Re: HELP: SQL SELECT
From: David Scott <dscott_at_is.net>
Date: 1995/10/27
Message-ID: <dscott-2710952055290001_at_dscott.is.net>#1/1
David Scott
...how can I keep from singing?
email: dscott_at_is.net
Received on Fri Oct 27 1995 - 00:00:00 CET
Date: 1995/10/27
Message-ID: <dscott-2710952055290001_at_dscott.is.net>#1/1
In article <DGyL8M.L3q_at_twisto.eng.hou.compaq.com>, csivils_at_blkbox.com (Craig Sivils) wrote:
> snufupagus_at_aol.com (Snufupagus) wrote:
>
> >select * from pt_code where diag_cod = '621.100'
> >union
> >select * from pt_code where diag_cod = '303.500'
> >union
> >select * from pt_code where diag_cod = '339.000'
>
> The self join of the table to itself 3 times would work.
> The count distinct with the having > 3 clause would work if written
> correctly. And the above would have worked if they had used intersect
> rather than union.
>
And the whole thing would run a lot faster if it went:
select * from pt_code where diag_cod IN ( '621.100','303.500','339.000')
Just my $.02
David Scott
...how can I keep from singing?
email: dscott_at_is.net
Received on Fri Oct 27 1995 - 00:00:00 CET