By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,414 Members | 1,586 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,414 IT Pros & Developers. It's quick & easy.

append query

P: 1
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.
Feb 9 '10 #1
Share this Question
Share on Google+
1 Reply


ck9663
Expert 2.5K+
P: 2,878
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
Feb 9 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.