04-28-2017 04:41 PM
I have two different datasets that provide info on claim amount paid by two different sources. Each set includes the claimant name, the date of incident, and the amount paid. So let's say Name1, Date1, and Paid 1 are fields in Set #1, and Name2, Date2, and Paid2 are fields in Set #2. Each of the two sets includes other fields that are not totally identical. What I need to do is to find out those claimants who are in both sets of data, i.e., Name1=Name2, and were injured on the same date and so Date1=Date2, and then create a new field named as TotalPaid = Paid1+Paid2. That is, I need to find out the total amount of paid for each claimant from both sources. For those claimants exist only in one and not both sets, then TotalPaid=0. The rationale of using these two conditions to set up the new field is because it is not likely that two individuals who got injured on the same date will have the same name. How can I do that? Thanks for helping.
04-28-2017 04:46 PM
Post sample data and expected output - not real data because you obviously can't release that, but some data that's similar to what you have, especially if you want code.
Things that are unclear in your current question:
Otherwise this is most likely more easy to accomplish in SQL though a data step merge is also possible.