Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Syntax error on Access Insert SQL Statement

Hi

I am trying to use the following Access statement to insert records from one table into another if the data isn't already there. I am getting a syntax error on the following statement. The "SET" is highlighted on the error
INSERT INTO TABLE2
SET Table2.Col1 = Table1.Col1,
Table2.Col2 = Table1.Col2,
Table2.Col3 = Table1.Col3
WHERE NOT IN Table1.Col1(SELECT Col1 FROM Table2)
AND NOT IN Table1.Col2(SELECT Col2 FROM Table2)
AND NOT IN Table1.Col3(SELECT Col3 FROM Table2)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Sheils
Sheils
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks very much