Results 1 to 5 of 5
  1. #1
    rmayur is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2015
    Location
    Mumbai
    Posts
    20

    Lightbulb Please help append query giving duplicate records

    I have one append query below :



    NSERT INTO FCM ( [Transaction Date], [Order ID], [Intel BusinessID], [Business Name], [Reward ID], [Reward Description], [Redemption Partner], [Unit Point Cost], [Redemption Quantity], [Points Redeemed on Reward], [Principa Contact Login], [Principa Contact Email Address], [Principal Contact Number], [Contact First Name], [Contact Last Name], Country )
    SELECT Redemption_report.Transaction_date, Redemption_report.order_ID, Redemption_report.Intel_Business_ID, Redemption_report.Business_name, Redemption_report.reward_id, Redemption_report.order_description, Redemption_report.redemption_partner, Redemption_report.unit_point_cost, Redemption_report.redemption_quantity, Redemption_report.points_redeemed_on_reward, Redemption_report.principal_contact_login, Redemption_report.principal_contact_email_address, Redemption_report.principal_contact_number, Redemption_report.contact_first_name, Redemption_report.contact_last_name, Redemption_report.country_name
    FROM Redemption_report
    WHERE (((Redemption_report.reward_id) In (337434,359679,374235,374473,377303,377305,377318, 377331)) AND ((Redemption_report.redemption_partner)='FCM'));

    It is Giving me duplicate records.

    Means if I am importing 10 it giving me back 20 counts of record. Each records have duplication

  2. #2
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    Quote Originally Posted by rmayur View Post
    SELECT Redemption_report.Transaction_date, Redemption_report.order_ID, Redemption_report.Intel_Business_ID, Redemption_report.Business_name, Redemption_report.reward_id, Redemption_report.order_description, Redemption_report.redemption_partner, Redemption_report.unit_point_cost, Redemption_report.redemption_quantity, Redemption_report.points_redeemed_on_reward, Redemption_report.principal_contact_login, Redemption_report.principal_contact_email_address, Redemption_report.principal_contact_number, Redemption_report.contact_first_name, Redemption_report.contact_last_name, Redemption_report.country_name
    FROM Redemption_report
    WHERE (((Redemption_report.reward_id) In (337434,359679,374235,374473,377303,377305,377318, 377331)) AND ((Redemption_report.redemption_partner)='FCM'));
    What does this query returns?

    If it only returns 10 records as you expected, then you probably already have record in the table that match what you have just put in.

    If it it returns 10+ records, then you probably have duplicate records in your "Redemption_report" table.

    Good luck.

  3. #3
    rmayur is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2015
    Location
    Mumbai
    Posts
    20
    Yes what you said is right..... If actual records has to be 10 but it returns 20... I want to remove that duplicate record... but how?
    But in redemption report no duplicate records are available.... please help?

  4. #4
    rmayur is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2015
    Location
    Mumbai
    Posts
    20
    Please any one can help.......when I get export file in excel it gives record duplication

  5. #5
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    Using "DISTINCT" or "GROUP BY" will remove the duplicates.

    1) SELECT DISTINCT ...FIELDNAMES FROM TABLENAME WHERE .....
    2) SELECT FIELD1, FIELD2, ... FIELDN FROM TABLENAME WHERE .... GROUP BY FIELD1, FIELD2, ... FIELDN;

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

Similar Threads

  1. Replies: 4
    Last Post: 04-21-2014, 11:44 AM
  2. Regarding duplicate records in a query
    By ritimajain in forum Queries
    Replies: 30
    Last Post: 07-18-2013, 11:00 PM
  3. Replies: 3
    Last Post: 07-13-2012, 09:18 AM
  4. Replies: 1
    Last Post: 12-09-2011, 07:34 AM
  5. append query without duplicate record
    By smahdih in forum Queries
    Replies: 5
    Last Post: 11-16-2011, 12:29 AM

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