This works, but is just as slow, or slower than the original SELECT ... NOT
IN ... SELECT we were using.

Kevin


>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
>Behalf Of Dave Crozier
>Sent: Wednesday, April 23, 2008 10:55 AM
>To: [EMAIL PROTECTED]
>Subject: RE: Looking to optimize a query
>
>Kevin, 
>
>Create Cursor curA (Id C(20))
>Insert Into curA Values ("A01")
>Insert Into curA Values ("B01")
>Insert Into curA Values ("C01")
>Insert Into curA Values ("D01")
>*
>Create Cursor curB (Id C(20))
>Insert Into curB Values ("Z01")
>Insert Into curB Values ("B01")
>Insert Into curB Values ("C01")
>Insert Into curB Values ("E01")
>
>Select all ;
>       curA.Id ;
>>From curB ;
>Right Join curA On curB.Id=curA.Id ;
>where Isnull(curB.id)
        

>This gives you records in the left table which aren't in the right table
>and
>should get you started.




_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to