View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
stumac stumac is offline
external usenet poster
 
Posts: 41
Default Excel appending to Access - no duplicates

Hi Zeyneddine, as long as by duplicates you mean exact copies you could use:

INSERT INTO Funding
SELECT DISTINCT *
FROM LinkedFunding;


Hope this helps
Stu

"zeyneddine" wrote:

Hi,
I am trying to write a macro which would take the contents of one table in
Access and append to another table, but am trying to prevent duplicates,
through Excel.
My query is as below:

Insert into Funding
Select LinkedFunding.*
From LinkedFunding;

How do I verify that no duplicates are made? The primary key is Instrument.
I could potentionally determine duplicates based on same instrument on the
same day, that is instrument ABC for 11/29 and again ABC for 11/29. I can
have ABC for 11/30 but not two records of instrument ABC for 11/29 or 11/30.

Please assist.