BookmarkSubscribeRSS Feed
myelemes
Fluorite | Level 6

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;

 

 

 

 

1 REPLY 1
SASKiwi
PROC Star

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. 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to connect to databases in SAS Viya

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.

Discussion stats
  • 1 reply
  • 1283 views
  • 0 likes
  • 2 in conversation