>I have two tables namely 1. "studenta.dbf" with fields 1. id 2. name 3. dob 4. community 4. nationality 5. phy 6.maths 7. chemistry 8.total and another table namely 2."studentb.dbf" this table having same "studenta" table fields so both the tables having same fields and records. I want compare the two tables and extract the unmatched records and these records will sent report designer which I have already created.
>
> How to write code?
Assuming that you match records by ID it may look following:
Select * From StudentA Where ID Not in (Select ID From StudentB) ;
Union All Select * From StudentB Where ID Not In (Select ID From StudentA) Into Cursor Mycursor Nofilter
If you match by name then adjust it a bit, i.e. use Name instead of ID.
Edward Pikman
Independent Consultant