Page 3 of 3 First 123
  • Jump to page:
    #31
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    26
    Rep Power
    0
    I just ran the code and it returned still returned more than one, it eliminated most of them but some of them are showing two.
  2. #32
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    26
    Rep Power
    0

    Thanks


    Originally Posted by dennisdj
    I just ran the code and it returned still returned more than one, it eliminated most of them but some of them are showing two.
    Ok I just noticed where some that a few have claims that have the same adjudication_date. I should be able to run another query on this query and just group the results by adjudication_date to eliminate the few duplicates, correct?
  4. #33
  5. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,170
    Rep Power
    4274
    Originally Posted by dennisdj
    Ok I just noticed where some that a few have claims that have the same adjudication_date.
    i ~knew~ you were going to come back with this

    look, we're now on the 3rd page of this thread, and it has been a pleasure working with you, but you really have to take things from here on by yourself
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  6. #34
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    26
    Rep Power
    0
    Ok... I did not ask you to do it for me, I just asked if what I was going to do was correct. Anyway, I figured it. I will go back and read the rules as I did not know there was a page limit on the forums. Thanks for your help- I was really helpful.
  8. #35
  9. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,170
    Rep Power
    4274
    Originally Posted by dennisdj
    I will go back and read the rules as I did not know there was a page limit on the forums.
    i'll save you the trouble, there is no such limit

    i just ran out of gas, man

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  10. #36
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    26
    Rep Power
    0
    Originally Posted by r937
    i'll save you the trouble, there is no such limit

    i just ran out of gas, man

    Its all good. You were very helpful! No complaints!
  12. #37
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2012
    Posts
    29
    Rep Power
    0
    It seems to be quite easy to do so, you can write a simple query for it.

    Select * from table-name where patient_last_name = 'targeted_value' AND patient_first_name = 'targeted_value' AND proc_code = 'targeted_value' AND DOS = 'targeted_value' AND status = 'denied' AND approved_amount >= 0
    Originally Posted by dennisdj
    I am trying to write a query to find duplicates and I have been unsuccessful. I need to query records where if patient_last_name, patient_first_name, proc_code, and DOS are equal AND all the status of all who meet the that criteria have a status equal to "denied" AND none of these have a approved_amount greater than zero. I have tried so many variations and have been unsuccessful. It should be simple code but I don't know if it is logical possible with one table. Any suggestions?. Have included some test data since I am working with PHI information.
  14. #38
  15. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,170
    Rep Power
    4274
    abiabiah, that's not even close

    please read the entire thread

    GROUP BY will be required
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
Page 3 of 3 First 123
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo