Here is a thought, albeit I'll probably get diss'd for it. Take a simple DELETE query. Assume you have a master table [in Access or SQL Server or Oracle....] and import data from a workbook into a temp table that has a similar structure. Both tables have a common field that is unique [may or may not be a primary key]....Originally Posted by malik641
So, before appending the temp table to the master table you want to DELETE all rows in the temp table where the common field already exists in the master table?
Easy enough to map out as an Access query using the GUI, but if you examine the SQL code you will notice Access uses an INNER JOIN syntax with more parentheses than persons trying to cross the Mexican border.
Assuming [again] you would use ADO and code the SQL, you would want something like
DELETE * from [temp] WHERE [expresion] in [Master] - because that is simple and logical
and an opportunity to introduce the Novice/Newbie/LazyAss who wants someone to do it for them to SubSelects.
.02 Stan