Results 1 to 3 of 3
  1. #1
    Join Date
    May 2013
    Posts
    2

    Unanswered: Tricky remove duplicates query

    I apologize in advance, I am still very new to Access...

    I have a list of medical procedure codes that I had to remove out of a pdf document. The list was made from 64 different tables in the original document, and after doing all of this I noticed that some of the data repeats. However they are not 100% "true" duplicates, since the records are not 100% the same. I am tring to remove these from the list. The list contains about 5100+ records, but not all of the codes were duplicated.

    The data I need contains the following fields:

    ProcedureCode
    Description
    SeverityLevel
    Explanation
    POS
    Ref#
    UVR
    Rate

    The the procedure codes are supposed to be the primary key, and each record should contain a value in either the "UVR" or "Rate" field. Reason being if there is no fixed rate for the procedure, the UVR is multiplied by another standard rate...

    However, the duplicates I am trying to remove contain a duplicated ProcedureCode and a duplicated Description but do not contain a value for either the UVR or the Rate.

    Ex:
    Code Desc SL Expl POS Ref# UVR Rate
    0001 Shot 1 Gen shot PB 00011 56 (null)
    0001 Shot 1 Gen shot PB 00011 (null) (null)
    0002 Shot 2 1 Gen shot PB 00021 (null) 1.654
    0002 Shot 2 1 Gen shot PB 00021 (null) (null)

    With the duplicates being the bold records.

    I would appreciate any help.

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    The example you provide makes no sense towards your explanations:
    Quote Originally Posted by andresej21 View Post
    However, the duplicates I am trying to remove contain a duplicated ProcedureCode and a duplicated Description but do not contain a value for either the UVR or the Rate.
    Then:
    Quote Originally Posted by andresej21 View Post
    Ex:
    # Code Desc SL Expl POS Ref# UVR Rate
    1 0001 Shot 1 Gen shot PB 00011 56 (null)
    2 0001 Shot 1 Gen shot PB 00011 (null) (null)
    3 0002 Shot 2 1 Gen shot PB 00021 (null) 1.654
    4 0002 Shot 2 1 Gen shot PB 00021 (null) (null)

    With the duplicates being the bold records.
    Line #2 and line #4 (I added the line numbers) are supposed to be "duplicated", while they do not have the same Code (0001 for line #2 and 0002 for line #4) while the condition to identify "duplicated" lines are a duplicated ProcedureCode and a duplicated Description.
    Have a nice day!

  3. #3
    Join Date
    May 2013
    Posts
    2
    Line #2 and line #4 (I added the line numbers) are supposed to be "duplicated", while they do not have the same Code (0001 for line #2 and 0002 for line #4) while the condition to identify "duplicated" lines are a duplicated ProcedureCode and a duplicated Description.
    Thanks for your reply, sorry if my example wasn't clear. I'm showing two different records that are duplicated. Line 2 is the unwanted duplicate of Line 1 and and Line 4 is the unwanted duplicate of Line 3. I did two examples to show how the identification of a correct record can vary by the UVR field (Line 1) or the Rate field (Line 3).

    Hope this helps.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •