Update: I found out the reason on this. Apparently proc sql will not assign formats to derived variables, that's why the select * here wouldn't work. The second obstacle was when I referred to cccp_key’s format in SAS, I assumed it was format 20.0 based on the output from running proc contents. However, proc sql it requires the exact output so I had to change my format accordingly. The max number of my first column is 16-digit number, not 20. Hence:
proc sql;
create table PrD.smp_203 as
select account_key format=16.0 as account_key, date, etc, etc...
from SAS.smp_203;
run;
... View more