Question : select query

Hi,
I have two tables, tblA and tblB both has same fields. tblA is containing old records and tblB is containing new records.

1. Now I want a select query which will be producing all records from tblB where tblA.ERNO = tblB.ERNO And tblA.EID = tblB.EID

2. I want another query which will be producing all records from tblB where the records does not matches  tblA.ERNO = tblB.ERNO And tblA.EID = tblB.EID

I am using MS ACCESS 2003.

Answer : select query

Create a new query, switch to SQL view and paste the lines (one per query)

1. Select tblA.*, tblB.* FROM tblA Inner join tblB ON tblA.ERNO = tblB.ERNO And tblA.EID = tblB.EID

2. Select tblB.* FROM tblB LEFT join tblA ON tblB.ERNO = tblA.ERNO And tblB.EID = tblA.EID WHERE nz(tblA.EID,"") = ""


Random Solutions  
 
programming4us programming4us