Results 1 to 3 of 3
  1. #1
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402

    Append query without duplicates using two id's

    Hi Guys

    I am really sorry if this has been asked before, but I am struggling with an Append query

    I have 2 tables "UnexUpdateData" and "UnexData"

    both these tables hold the following

    ID, salesOrder, WO, AccountName, ItemNumber, Decription,ValueCE, and SEQID

    I am trying to append data from the "UnexUpdateData" table to the "UnexData" table where the salesorders and SEQID are not duplicated.

    this is the code I am using for the append query

    INSERT INTO UNEXData ( ID, SalesOrder, WO, ACCOUNTNAME, ITEMNUMBER, DESCRIPTION, VALUEœ, QTYINSTOCK, QTYOUTST, DUEDATE, SEQID )
    SELECT UnexUpdateData.ID, UnexUpdateData.[Sales Order], UnexUpdateData.WO, UnexUpdateData.[ACCOUNT NAME], UnexUpdateData.[ITEM NUMBER], UnexUpdateData.[DESCRIPTION-1], UnexUpdateData.[VALUE œ], UnexUpdateData.[QTY IN STOCK], UnexUpdateData.[QTY OUTST], UnexUpdateData.[DUE DATE], UnexUpdateData.SEQID


    FROM UnexUpdateData;

    how can I stop the duplicate entries being appended

    any help on this would be fantastic

    Steve

  2. #2
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    You really need to step back from Append and focus on a simple select query. You want to create a select query that always results in the record set you seek....which is one without duplicate entries... Once that is established - then create an Append query using this Select query as its record set starting point.

  3. #3
    sdel_nevo is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Apr 2013
    Location
    Gloucester, UK
    Posts
    402
    HI NTC

    great idea many thanks

    will work on that now

    Cheers

    Steve

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 6
    Last Post: 10-23-2013, 08:06 AM
  2. Append query is creating duplicates
    By D4WNO in forum Database Design
    Replies: 3
    Last Post: 12-10-2012, 10:47 AM
  3. Append query creating duplicates
    By dhicks19 in forum Queries
    Replies: 1
    Last Post: 05-14-2012, 06:36 AM
  4. Replies: 1
    Last Post: 10-06-2011, 08:37 AM
  5. Replies: 7
    Last Post: 07-21-2011, 01:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums