RE: problem with UNION and not in clause
Posted in 2000
I suspect in addition to giving you credit, he was also happy to be able
to use the phrase;
'Dick's got the best answer'
(But maybe I misjudge him :) )
-----Original Message-----
From: Richard harnden [mailto:harndr@russelleurope.com]
Sent: Friday, July 21, 2000 8:25 AM
Posted To: informix
Conversation: problem with UNION and not in clause
Subject: Re: problem with UNION and not in clause
Thank you, Mr Clown.
But, you see, I'm wrong.
Thing is: UNION doesn't return duplicates anyway.
So the whole not in/exists bit is pointless.
All you actually need is:
select f1, f2 from tableA where f3=1 and f4=2
and rec_type='CURRENT'
union
select f1, f2 from tableA where f3=1 and f4=2
and rec_type='PREVIOUS'
>>> "Obnoxio The Clown" <obnoxio@hotmail.com> 07/21/00 10:57am >>>
From: "Obnoxio The Clown" <obnoxio@hotmail.com>
>
>I think you could also do this with NOT EXISTS...
Dick's got the best answer...
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com