Anna Jewell
New member
- Local time
- Today, 13:43
- Joined
- Jul 9, 2002
- Messages
- 6
Hi, I'm having trouble with an append query. I've got one table (table2) in which i have done an unmatched query to extract rows that are different from the original table (table1). I want to put the unmatched rows into the original table. i.e. original table = table1, new table = table2. I've set up the query with:
INSERT INTO table1 IN 'C:\WINDOWS\Desktop\access1.mdb'
(SELECT DISTINCTROW [table2].[fieldname1] AS [fieldname1] etc
FROM [table2] LEFT JOIN table1 ON iif (([table2].[fieldname1] Is Null) AND ([table1].[fieldname1] Is Null), True, [table2].[fieldname1] = [table1].[fieldname1]) etc
FROM table2 IN 'C:\WINDOWS\Desktop\access1.mdb'
WHERE ((([table1].[fieldname1]) Is Null)));
I keep getting an error message when I try to run this. Has anyone got any ideas??
INSERT INTO table1 IN 'C:\WINDOWS\Desktop\access1.mdb'
(SELECT DISTINCTROW [table2].[fieldname1] AS [fieldname1] etc
FROM [table2] LEFT JOIN table1 ON iif (([table2].[fieldname1] Is Null) AND ([table1].[fieldname1] Is Null), True, [table2].[fieldname1] = [table1].[fieldname1]) etc
FROM table2 IN 'C:\WINDOWS\Desktop\access1.mdb'
WHERE ((([table1].[fieldname1]) Is Null)));
I keep getting an error message when I try to run this. Has anyone got any ideas??