SQL returns "not into" other query (1 Viewer)

maikon

Oxxx|:::::::::::>
Local time
Today, 15:49
Joined
Jan 13, 2005
Messages
22
Hi people,

Do exists a way to a query return what doesn't into other query?

For example:

SELECT *
FROM table
WHERE "NOT INTO" (SELECT *
FROM table
WHERE ... )

Someone understood?!

Thanks a lot!
 

FoFa

Registered User.
Local time
Today, 13:49
Joined
Jan 29, 2003
Messages
3,672
Where MyCol NOT IN (select OtherCol from MyTable)

But Access is not the best performing with this just so you know.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 14:49
Joined
Feb 19, 2002
Messages
43,774
Use the query builder wizard to create an "unmatched" query. It generates a left join and select rows where the key field in tblB is null which is usually more efficient than the subquery.
 

Users who are viewing this thread

Top Bottom