Newbie - Referential Integrity problems

S

Support

I have created a database with some raw customer data given to me.
The tables consist of:
tblCustomers - primary key of ordergroup_id 65,040 records
tblOrders - primary key of ordergroup_id 65,378 records
tblOrdelines - foreign key order id 153,577 records

I have removed nulls and deduped tblCustomers.
I have created a one to many relationship between tblOrders and
tblOrderlines that uses referential integrity and this works fine.
When I try and create a join between tblCustomers and tblOrders, I can
create the link between ordergroup_id however I cannot
enforce referential integrity. I am assuming this is because I have 338
more records in one table.
I don't know how to go about comparing the two tables to discover the orphan
records.
Can anyone offer some advice please?
Many thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top