Correct me if I am wrong, but would SELECT zip FROM table1 WHERE NOT EXISTS (SELECT zip FROM table2 WHERE zip = table1.zip)
Not be a whole faster? Using IN would not stop after it found one occurrence, EXISTS would stop after it finds one occurrence. Could be wrong, had a long day... Taco Fleur > -----Original Message----- > From: Ben Forta [mailto:[EMAIL PROTECTED] > Sent: Wednesday, 17 November 2004 7:23 AM > To: CF-Talk > Subject: RE: Oddball Query question... > > > Quick and dirty could be: > > SELECT zip > FROM table1 > WHERE NOT zip IN (SELECT zip FROM table2) > > > > -----Original Message----- > From: Jeff Waris [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 16, 2004 4:09 PM > To: CF-Talk > Subject: Oddball Query question... > > Odd query question.... MY brain is lagging at 4:00pm... I > need some help.... > > Table one has a list of zip codes. > Table two has a list of zip codes. > > I want to compare table one to table two. The results would > list ONLY the zip codes that appear in table one that do not > appear in table two. > > Any help is greatly appreciated... > > Thanks, > Jeff > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184536 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

