Seth
Very sorry that it has taken me so long to try this and get back to you (I
am a re-active rather than pro-active type!).
Your solution is JUST what I wanted.
Thanks very much
Mark
----- Original Message -----
From: "Seth Wagoner" <[EMAIL PROTECTED]>
To: "Multiple recipients of list database" <[EMAIL PROTECTED]>
Sent: Sunday, May 13, 2001 11:40 PM
Subject: Re: [DUG-DB]: SQL poser
>
> > What I really wanted to do was this (in pseudocode)
> >
> > Delete from SaleREF s
> > where (s.CustCode, s.DestCode) not in
> > (select distinct (CustCode, DestCode) from CustDest)
> >
> > I'm sorry but I can't pick how I need to change your code to achieve
> > this.
>
> How about:
>
> delete from SalesRef s where not exists (select c.CustCode from
> CustDest c where s.CustCode=c.CustCode and s.DestCode=c.DestCode)
>
> Seth.
> =======================================================
> Seth Wagoner, WebFoundry Ltd. Christchurch, New Zealand
> mailto:[EMAIL PROTECTED] http://webfoundry.co.nz
>
> --------------------------------------------------------------------------
-
> New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
---------------------------------------------------------------------------
New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz