Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Excel appending to Access - no duplicates

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   Report Post  
Posted to microsoft.public.excel.misc
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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 16
Default Excel appending to Access - no duplicates

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Excel appending to Access - no duplicates


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Refresh Issues when linking Access queries to Excel Rob Excel Discussion (Misc queries) 0 October 6th 06 06:40 PM
October Excel / Access User Conference Damon Longworth Excel Worksheet Functions 0 August 30th 06 01:22 PM
Started out as an Access problem. Now an Excel problem RobertM Excel Discussion (Misc queries) 2 April 26th 06 07:30 PM
Excel Access and Oracle Chris K Excel Discussion (Misc queries) 1 February 17th 06 06:16 PM
Easiest Way to have access functionality in Excel or vice-versa? John Excel Worksheet Functions 4 May 27th 05 09:15 PM


All times are GMT +1. The time now is 05:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"