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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: