I have this code and do not think it is 100% correct: proc sql; create table implants.test1 as (select * from implants.alldrgs_asofi where clm_aud_nbr in ('%1111111111%', '%2222222222%', '%3333333333%', '%4444444444%', '%5555555555%', '%6666666666%', '%7777777777%', '%8888888888%', '%9999999999%') group by clm_aud_nbr); run; The numbers in the in are just made up since I cannot give you actual claim numbers due to privacy laws. But each claim is actually 12 digits in length and the 01, 02, 03 etc that follows the 10 digit claim number notes pages. We do not know how many pages are associated with each claim so all we want to do is pull all the pages associated with that 10 digit claim number without trying to figure out who has 01, 02, 03 etc. They can go on up to 50 pages in length.
... View more