Connect with Expertise | Find Experts, Get Answers, Share Insights

append query

 
Join Date: Feb 2010
Posts: 1
#1: Feb 9 '10
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's Avatar
E
C
 
Join Date: Jun 2007
Posts: 2,255
#2: Feb 9 '10

re: append query


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

Expand|Select|Wrap|Line Numbers
  1. SELECT * FROM YOURTABLE1 where paydate = getdate() and paycode = 'PAID'
  2. union all
  3. SELECT * FROM YOURTABLE2 where paydate = getdate() and paycode = 'PAID'
  4.  
I don't know your table structure, so that's just a pseudo-code.

Happy Coding!!!

~~ CK
Reply

Tags
append query, custom script, sql scripting