Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
No it doesnt at all.
As I said, the duplicates meaning the table that is being APPENDED does not have duplicates. The query you gave is the most basic thing ever. Give me some credit dude. What I need is that no records be entered into Funding from LinkedFunding that are ALREADY present in Funding. Is there no smart dude here? "stumac" wrote: 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. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Create an index in the FUNDING table that takes into account all fields that make the record unique (as long as this isn't over 10 fields) and set the unique property to yes access will then reject the duplicates. Stu "zeyneddine" wrote in message ... No it doesnt at all. As I said, the duplicates meaning the table that is being APPENDED does not have duplicates. The query you gave is the most basic thing ever. Give me some credit dude. What I need is that no records be entered into Funding from LinkedFunding that are ALREADY present in Funding. Is there no smart dude here? "stumac" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Refresh Issues when linking Access queries to Excel | Excel Discussion (Misc queries) | |||
October Excel / Access User Conference | Excel Worksheet Functions | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
Excel Access and Oracle | Excel Discussion (Misc queries) | |||
Easiest Way to have access functionality in Excel or vice-versa? | Excel Worksheet Functions |