Hi there I am trying to perform the below SQL code in a proc sql in SAS SQL code: select reference into #Wi from #all where Reference in (select left(Reference ,len(Reference )-1)+ max(right(Reference ,1)) from stgw group by left(Reference ,len(Reference )-1)) group by Reference , UCN1 order by ucn1 I tried: proc sql; create table Wi as select reference from all where Reference in (select left(Reference ,len(Reference )-1)+ max(right(Reference ,1)) from stgw group by left(Reference ,substr(Reference, lenght(Reference)-1,0))) group by Reference , UCN1 order by ucn1 Error: ERROR: Function LEN could not be located. ERROR: Expression using subtraction (-) requires numeric types. How can I perform the length function in SAS PROC SQL?
... View more