Hi,
I have some trouble.I have one table( here person)
data person; infile datalines delimiter=','; input CREANCE $14. POND REPOR RISK $ COUNTRY$; datalines; 20241514156EUR,272186, 136093,ART122, FR 20241514156EUR,272186, 136093,ART122, NO 20085273456EUR,341928, 65688,ART126-b, FR 20085273456EUR,341928, 170964,ART126-a, FR ;
and i would like to have this one in result
data person1; infile datalines delimiter=','; input CREANCE $14. POND REPOR RISK $ COUNTRY$; datalines; 20241514156EUR,272186, 136093, ART122-ART122,FR-NO 20085273456EUR,341928, 236652, ART126-b-ART126-a,FR-FR ;
Here the first column are equal and the last column are not equal, so i keep the first, second, third column, concatenate the fourth and fifth column.
20241514156EUR,272186, 136093,ART122, FR 20241514156EUR,272186, 136093,ART122, NO
For others, first colum are identical the same as the last column, so i keep the first, second column, sum the third column, concatenate the fourth and fiht column.
20085273456EUR,341928, 65688,ART126-b, FR 20085273456EUR,341928, 170964,ART126-a, FR
Thanks in advance.
... View more