Hello, I need your help, I have to create 2 tables, in the first one I have all the data of the insurance policies with the due payments, in the other I have the quotas that belong to the company to pay (percentages).
when i apply
date db_pol;
merge db_polices_total (in=a) quota_share (in=b);
by catena;
if a;
which works, but if I have 2 policies with the same number, only the first line is populated, the second one does not receive the corresponding quota.
First thing to check for: does your db_policies_total data set already contain a percentages variable before the merge. If that's the problem, you can get rid of it using:
date db_pol;
merge db_polices_total (in=a drop=percentages) quota_share (in=b);
by catena;
if a;
Of course, I don't know your variable names. You would have to use the proper name that exists in your data.
@u57961979 wrote:
Hello, I need your help, I have to create 2 tables, in the first one I have all the data of the insurance policies with the due payments, in the other I have the quotas that belong to the company to pay (percentages).
when i apply
date db_pol;
merge db_polices_total (in=a) quota_share (in=b);
by catena;
if a;
which works, but if I have 2 policies with the same number, only the first line is populated, the second one does not receive the corresponding quota.
Which variable has the policy number? Do both data sets have multiple values of the same number?
It may help to show us the LOG from running your code. Copy the log text including the code and all messages from that data step. On the forum open a text box with the </> icon above the message window and paste the text.
PS: you misspelled Data as Date above.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.