append query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mjernigan
    New Member
    • Feb 2010
    • 1

    append query

    I work for an insurance payor and I am trying to come up with a SQL script that will provide appended data from 2 different Unix based tables. I would like to be able to select only changed/updated data (pay date will be used as the variable) from those tables while separating into one of 4 catagories (paid, held, void or suspended) depending on the pay code.
    Is there anyone out there who can possibly help me?

    Mike J.
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Assuming you're getting all PAID records for this day:

    Code:
    SELECT * FROM YOURTABLE1 where paydate = getdate() and paycode = 'PAID'
    union all
    SELECT * FROM YOURTABLE2 where paydate = getdate() and paycode = 'PAID'
    I don't know your table structure, so that's just a pseudo-code.

    Happy Coding!!!

    ~~ CK

    Comment

    Working...