convert column in qry1 and return unmatched

  • I have a problem....

    I have cpt codes in qry1 that need to be converted then match against qry2 and return the unmatched.

    Example:

    Cpt 88305 in qry1 can be either g4164 or g4165 in qry2

    Cpt 88174 in qry1 can be either g3564 or g3565 or g3566 in qry2

    select

    Invoice_number

    ,cpt

    From qry1

    Select

    Invoice_number

    ,cpt

    From qry2

    What is the easiest way to get the unmatched from qry1 against qry2 joining on invoice_number and converted cpt?

    Any help is appreciated.....

  • WHERE NOT IN

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply