Hi everyone, I am trying to leverage PROC FEDSQL functionality for handling column names which are longer than 32-bits without going through renaming/labeling. Database I am pulling data from is Sybase
Does anyone know how can I approach this problem and move towards a performance friendly solution?
Example query which I am trying to get to work:
proc fedsql libs=(mba worklib);
create table worklib.equifax_scores_raw as
SELECT
ACTIVE_TRADES_UTIL_50TO69_BAL_AMT,
'MBA' as sys_src_c,
current_timestamp as sys_ld_dtm,
-1 as sys_ld_evt_id
FROM mba.dsa.equifax_das_scr
where mba_run_dtm > TIMESTAMP&equifax_data_date;
quit;
34 %put equifax_data_date .............................. &equifax_data_date;
equifax_data_date .............................. '2018-05-11 19:51:09.744'
Current issue:
Need FEDSQL to parse long column name: ACTIVE_TRADES_UTIL_50TO69_BAL_AMT
Current error:
ERROR: BASE driver, Column name ACTIVE_TRADES_UTIL_50TO69_BAL_AMT is too long for a SAS name NOTE: PROC FEDSQL has set option NOEXEC and will continue to prepare statements. 33 quit;
SQL passthrough is the more common way to fix this. You don't need to rename columns as SAS can handle that automatically. You do have to rename table names though. The 32 character limit on SAS column names and tables is being expanded to 128 in SAS 9.5, due out sometime in 2019 I understand.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.