Has anyone faced problems while loading an SQL table with long column names? When i try to drag a table having long column names onto a process flow from a library , I get the error that an Open data operation and the error is that the variable < long column name> is not foind in the file.
It appears to me that the SAS/Access engine for SQL server is not able to recognize long column names. If anyone has experienced this, would love to know what workarounds are avaialbe for this issue.
Thanks,
Sethu
Try this SAS option: options validvarname = V7;
This should truncate on-the-fly any long SQL Server column names to no more than 32 characters.
One workaround is to create a view that has the variable renamed to something that's shorter.
Then load the view.
Thanks for the reply.
I also posed this question to SAS technical support and they came back with the following solution:
"
For the long column names, in EG go to Tools>Options>SAS Programs.
Put a check mark beside "Submit SAS code when server is connected" and click the Edit box. Enter:
options validvarname=v7;"
This has the effect of truncating the long variable names but it allows me to proceed with defining tasks on EG
Cool - problem solved. Please be aware the 32 character limit also applies to table names. If you have table names > 32 characters they will not show in your data libraries / server list at all and you will need to use SQL passthru to read them.
Try this SAS option: options validvarname = V7;
This should truncate on-the-fly any long SQL Server column names to no more than 32 characters.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.