J
Jim Jones
I have 2 tables called, say, Maintable and Secondtable. School students are
identified in these tables by 2 fields in each table, one called Centre which
identifies the school with a 5 digit alphanumeric code and the other called
Cand which is the 4 digit student number (Cand is unique in the school but
not in the table since each school will start numbering students from 0001.
My problem is that I need to delete records from Secondtable if the student
does not exist in the first table. So, I take Centre and Cand for each
record in turn in Secondtable and then I need to look at Maintable to see if
a student exists with the same values of Centre and Cand. If not then I want
to delete the record in Secondtable.
It''s easy to identify the students that exist, but apparently not so east
to identify those who don't.
Thanks in anticipation of any help.
Jim Jones
identified in these tables by 2 fields in each table, one called Centre which
identifies the school with a 5 digit alphanumeric code and the other called
Cand which is the 4 digit student number (Cand is unique in the school but
not in the table since each school will start numbering students from 0001.
My problem is that I need to delete records from Secondtable if the student
does not exist in the first table. So, I take Centre and Cand for each
record in turn in Secondtable and then I need to look at Maintable to see if
a student exists with the same values of Centre and Cand. If not then I want
to delete the record in Secondtable.
It''s easy to identify the students that exist, but apparently not so east
to identify those who don't.
Thanks in anticipation of any help.
Jim Jones