How to Append to table from Unmatched query results (1 Viewer)

BJF

Registered User.
Local time
Today, 09:57
Joined
Feb 19, 2010
Messages
133
Hi Everyone!

I am not sure how to append records to a table from my unmatched query.

I have run an unmatched query on my tblClients and tblShipToForClients.

The result is that i get 4138 records from tblClients without a match in tblShipToForClients.

How do i get those 4138 records added to my tblShipToForClients?

My goal is too force referenetial integrity in the relationships window with those two tables.

Thanks for any advice.
BJF
 

CJ_London

Super Moderator
Staff member
Local time
Today, 14:57
Joined
Feb 19, 2013
Messages
16,611
the standard query for this would be
Code:
INSERT INTO TableA
[COLOR=red]SELECT TableB.* FROM TableB LEFT JOIN TableA ON TableB.ID=TableA.ID[/COLOR]
[COLOR=red]WHERE TableA.ID is null[/COLOR]

The bit in red is the unmatched part of the query which should be very similar to the one you have created, subject to your table and field names
 

Users who are viewing this thread

Top Bottom