Results 1 to 5 of 5
  1. #1
    capjlp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Location
    Berea, Ky
    Posts
    26

    Duplicate Query

    Hi Folks



    I need to create a duplicate query and I can't seem to get the wizard to do what i want.

    I have one table that have monthly usage data in it and its imported data from other sources. I have had issues with data being duplicated. It has several fields but I only want to look at 4 to determine if they are duplicates.

    I need to look at these four fields I Put a short description.

    orgcode - Organization Code
    accountid - The id of the account These 2 fields are my key's some orgs may have the same ccount id but one org will never have a duplicate.

    I am looking for duplicates in these two fields
    BillingDate - Month and Year of bill example Nov-14
    Usage - The usage for the month - example 1000

    I want to see a duplicate if I have a return that looks like this.

    ORG1, 1234, Nov-14, 1000
    ORG1, 1234, Nov-14, 1000

    That would tell me its most likely a duplicate. I can have something like this

    ORG1, 1234, Nov-14, 1000
    ORG1, 1234, Nov-14, 800

    That wouldn't be a duplicate. Does that make since? I just need to display it and be able to manually delete the duplicate record.

    Thank you in advance for the help.

  2. #2
    vinod.excel is offline Novice
    Windows 8 Access 2013
    Join Date
    Nov 2014
    Posts
    2
    you can write a query with these 4 fields only and apply Group by clause at the end use Having clause

    Finally your query looks like this....

    Select orgcode, accountid,BillingDate,Usage, , Count(*) AS Expr1
    From Table1
    Group By orgcode, accountid,BillingDate,Usage
    HAVING (Count(*)>1);

    Now it will list all duplicated rows one time with no.of times they are repeated. Now you can go to Table1, look for rows from above query results and delete records which you don't want.


    Quote Originally Posted by capjlp View Post
    Hi Folks

    I need to create a duplicate query and I can't seem to get the wizard to do what i want.

    I have one table that have monthly usage data in it and its imported data from other sources. I have had issues with data being duplicated. It has several fields but I only want to look at 4 to determine if they are duplicates.

    I need to look at these four fields I Put a short description.

    orgcode - Organization Code
    accountid - The id of the account These 2 fields are my key's some orgs may have the same ccount id but one org will never have a duplicate.

    I am looking for duplicates in these two fields
    BillingDate - Month and Year of bill example Nov-14
    Usage - The usage for the month - example 1000

    I want to see a duplicate if I have a return that looks like this.

    ORG1, 1234, Nov-14, 1000
    ORG1, 1234, Nov-14, 1000

    That would tell me its most likely a duplicate. I can have something like this

    ORG1, 1234, Nov-14, 1000
    ORG1, 1234, Nov-14, 800

    That wouldn't be a duplicate. Does that make since? I just need to display it and be able to manually delete the duplicate record.

    Thank you in advance for the help.

  3. #3
    capjlp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Location
    Berea, Ky
    Posts
    26
    Hi Thanks for the reply that will work. I do have an identifier field that I could use to find the record how can I use that field in this query?

    Thank you

  4. #4
    capjlp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Location
    Berea, Ky
    Posts
    26
    Sorry I answered my own question. I will just make another query using this query to show me the Identifiers.

    Thanks
    Bill

  5. #5
    capjlp is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Nov 2014
    Location
    Berea, Ky
    Posts
    26
    Ok I created a query to show the duplicate records and a second query where i used the table and this duplicate query to show the full record. However the record set is read only is there a way to make it so I can get this set editable?

    Thanks

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

Similar Threads

  1. SUm duplicate values then delete duplicate rows
    By DonKaponne in forum Queries
    Replies: 1
    Last Post: 09-14-2014, 04:18 PM
  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: 03-01-2013, 12:41 PM
  4. Query will duplicate records
    By funkygoorilla in forum Queries
    Replies: 3
    Last Post: 09-29-2011, 01:32 AM
  5. Duplicate query with a twist
    By coach32 in forum Queries
    Replies: 3
    Last Post: 09-20-2011, 06:57 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