I'm trying to truncate the variable length to 30 and compare with another variable in the same query.
can you help me with the below 2 questions.
1. How to reuse the formatted variable in the query
2. How to limit the length of variable in the case when statement.
proc sql;
create table data1 as select
NAME length =30 as name_formatted,
case when name_formatted = name_2 then 'true' else 'false'
from table 1 a
;
quit;