There're at least 3 ways you can do that
SELECT * FROM mytable1 WHERE NOT EXISTS (SELECT 1 FROM mytable2 WHERE myfield1 = mytable1.myfield1)
SELECT mytable1.* FROM mytable1 JOIN mytable2 ON mytable2.myfield1 = mytable1.myfield1 ;
WHERE mytable2.myfield1 IS NULL
SELECT * FROM mytable1 WHERE myfield1 NOT IN (SELECT myfield1 FROM mytable2)
The second one most likely will be the fastest in VFP
>I was just wondering if i can write a query that selects all the data not found in another table. like
>select *
>from table
>where 100 is in one table... but not in the other table
>?
--sb--