I'm unable to copy the user defined Format of one SAS variable to the SQL table. In the below example, 'metadata_final' is a SAS dataset where it holds the formatted value for the variable STAT_CD. However when I tried copy the SAS table which has that formatted variable in SQL table it is not copying the formatted values instead it is copying the actual value.
Log is given below and even if I apply the Format Statement before creating the SQL table, it is not taking the Format. No WARNING or ERROR message in the log as well.
May I know how can I copy the formatted value in SQL table?
27 data SQLLIB.SQL_table; 28 Format STAT_CD $STAT_CD.;
29 set metadata_final;
30 run_id=sum(n,1);
31 output;
32 stop;
33 set SQLLIB.SQL_table nobs=n;
34 modify SQLLIB.SQL_table;
35 run;
NOTE: There were 1 observations read from the data set WORK.METADATA_FINAL.
NOTE: The data set SQLLIB..SQL_TABLE has been updated. There were 0 observations rewritten, 1 observations added and 0 observations
deleted.
... View more