What is the purpose of CC, it doesn't seem to determine anything and then it
gets cleared?
INSERT cc
SELECT main.*
FROM main
WHERE main.rowid NOT IN (SELECT rowid from aa)
INSERT dd
SELECT aa.*
FROM aa
WHERE aa.rowid NOT IN (SELECT rowid from main)
INSERT main
SELECT * from dd
DELETE aa
DELETE cc
DELETE dd
--
*************************************
Andy S.
an********@yahoo.com
*************************************
"Chris Petersen" <pe*********@hotmail.com> wrote in message
news:d1**************************@posting.google.c om...
I have 4 tables (AA,MAIN,CC,DD)
Everything that is not in AA but is in MAIN I want put into CC
Everything that is not in MAIN but is in AA I want put into DD
Add everything in DD to MAIN
Clear AA CC and DD
Thanks in advance