Identify problem records

steallan

Registered User.
Local time
Today, 12:48
Joined
Feb 9, 2005
Messages
46
Hi

i have a query that takes fields from various related tables to give me the information that i want

The primary table has 199955 records

The query displays only 199939

16 recordss are missing

I know why this is: the primary table (CWT reqd equip) has a field on it that is a primary key on another table (cwt Equip). On "CWT reqd equip" 16 records must have an entry in this field that is not present on the table where the entry is a primary key (cwt Equip).

I dont know how to identify what these 16 records are on the primary table. I want to get rid of them so i can enforce referential integrity between the two tables.

can anyone help? Have i wrote this clear enough?

thanks


p.s i've attached a doc showing how the query is built. the other tables other than the two i mentioned aren't important, for this.
 

Attachments

Select FK
from [CWT reqd equip] CRE
left join [cwt Equip] CE On CE.PK = CRE.FK
WHERE CE.PK is null
 
Groovey, thanks
 

Users who are viewing this thread

Back
Top Bottom