@Dave13 wrote:
@Patrick Thanks for the SQL code. I am unfortunately not very practiced with SQL, but will have to practice up. This example is very useful and will solve current and future issues. Thanks for all the help.
You can also use a SAS datastep for the same but getting some SQL expertise is certainly worth the effort.
data check(keep=n_leading_blk_SWISSPROT n_leading_blk_SEX);
set ratio2 end=last;
retain n_leading_blk_SWISSPROT n_leading_blk_SEX 0;
if length(swissprot) ne length(left(swissprot)) then n_leading_blk_SWISSPROT+1;
if length(SEX) ne length(left(SEX)) then n_leading_blk_SEX+1;
if last then output;
run;
proc print data=check;
run;
... View more