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

Dear there,

 

I am stuck by a simple problem. As I connect to my SQL Server through ODBC, I can see only part of the tables.

 

The following is the SAS code I used to connect to ODBC:

libname  mypega	 ODBC DSN  = 'PEGA'   schema=DecisionPoint;

SQL ServerSQL Server

 

SAS Explore WindowSAS Explore Window

 

Anyone who have the same problem before?

 

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

Who comes up with such crazy table names? We're a VERY large insurance company, and not one table in our production database has a name in excess of 32 characters.

 

Since, in your case, the horse is already out of the barn, you can only define views within the database that fit into SAS specifications lengthwise. 

View solution in original post

3 REPLIES 3
haowang
Calcite | Level 5

It seems that this is caused by the very long name of the SQL Server tables.

Patrick
Opal | Level 21

@haowang 

Yes, that's a known challenge. SAS table names can currently only be 32 characters max.

You can always use explicit pass-through SQL to work with longer DB table names but if you just want them to become accessible in SAS then you need to create views which comply with the SAS naming standards.

Kurt_Bremser
Super User

Who comes up with such crazy table names? We're a VERY large insurance company, and not one table in our production database has a name in excess of 32 characters.

 

Since, in your case, the horse is already out of the barn, you can only define views within the database that fit into SAS specifications lengthwise. 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 788 views
  • 0 likes
  • 3 in conversation