main logo
Subject: SELECT-Sql IN clause help
Author: "Alan Bourke"
Posted: 2006/11/30 11:26:05
 
View Entire Thread
New Search


I know this is simple but I\'m having a thick day.

Two tables

table1 (ref C(16))

table2 (parent C(16), ref C(16))

What\'s the VFP9 SELECT command to get the records out of table1 that do
not have a matching record in table2, matching the ref fields.

This works to get the ones that DO:

select * from table1 where ref in (select ref from table2)

but the opposite just returns one record, i.e.

select * from table1 where ref not in (select ref from table2)
--
Alan Bourke
alanpbourke (at) fastmail D.OT fm

--
http://www.fastmail.fm - Does exactly what it says on the tin




 
©2006 Alan Bourke
<-- Prior Message New Search Next Message -->