02-20-2012 05:40 PM
I have a data set of patient data with an original and unique ID number per visit. Occasionally the data is corrected so correction files are produced. THese corrections could include visits not previously submitted and the corrections may only be for one data element. What I would like to have happen is that any new abstracts will be added to the original data set from corrections and any data elements from corrections be updated in submissions.
The original file is "sub" and the corrected file is "corr". Sub has 1506 records and corr has 13 but when I used update the subsequent dataset was 1065 so it didn't work as planned. The code I used was:
update work.sub work.corr;
What function should I be using to get this to work as I'd like? Thanks very much.
02-20-2012 06:05 PM
Were both of your files sorted by Unique_Key ? It they were, seeing your log would be needed to see what may have happened.
If they weren't, sort them, then retry your code and let us know if your problem was solved.
02-21-2012 10:42 AM
I don't know what went wrong with the original but when I sorted them both by Unique_Key and then ran the update, I got 1506 records like I expected. Thank you both for your replies!