BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sethuraman_ram
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

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.

View solution in original post

4 REPLIES 4
Reeza
Super User

One workaround is to create a view that has the variable renamed to something that's shorter.

Then load the view.

sethuraman_ram
Obsidian | Level 7

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

SASKiwi
PROC Star

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.

SASKiwi
PROC Star

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 3553 views
  • 7 likes
  • 3 in conversation