I have a table (tbl1) which stores certain values related from another table (tbl2). I want to Query (tbl2) but i want the query to exclude the values that are present in tbl1. I was wondering if anyone could help i am not having much success at the minute thanks.
Mar 11 2005, 06:42 AM
Hi and welcome to UA
Assuming that the two tables are related thru a field named ID, you could use something like:
SELECT Table2.* FROM Table2 LEFT JOIN Table1 ON Table2.ID = Table1.ID WHERE Table1.ID Is Null;
Hope this helps
Mar 13 2005, 02:43 PM
Yeah Worked A Treat thanks A lot!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.