I'm getting the following error while trying access a SQL table trough an ODBC connection:
Name 'THISSQLTABLEISREALLYLONGOVER32CHAR' is too long for a SAS name in this context.
SAS only allows table names to be 32 characters but this one is longer then that. What can I do to be able to access the table? And no, I can't change the table name or run a query to duplicate the data to a table with a shorter name.
I read the documentation and put the ' at the front and end of the table name with an n at the end. The same error message is generated. The documentation references uses that for unacceptable characters but not for length. Under the length section there is no reference on how to use longer names.
You may need to open a track with Tech Support to resolve this. If you are using ODBC, the problem may be with the SAS/Access ODBC driver. It would be interesting to find out whether the same issue occurs with the SAS/Access product specifically designed for the database in question.
Please pardon my post to an old topic, but this issue has been an on-going struggle for our company for most of the past year.
We use SAS Enterprise Business Intelligence (EBI) on Linux for X64 (SuSE 10) and connect to our operational data stored on a PostgreSQL 8.4 replication server, also on 64-bit Linux (SuSE 10), through the SAS/ACCESS Interface to ODBC.
Our database architect likes to make the table names descriptive. Since Base SAS 9.2 has a limit of 32 characters for table and view names, I and my predecessor have had to work-around this limit by manually creating views on our replication server to shorten the table names.
A current project instantiated 100+ views, many with names longer than 32 characters. A new requirement for this project involves surfacing many of these tables directly to our analysts.
I am working with the database architect to find a simple solution which does NOT involve renaming 50 or more views to fit this name length constraint. Unfortunately, it looks like we may have no choice in the next few weeks.
How can I, CurlerBob, and others best voice our need for SAS 9.x to support longer SQL names for tables, views, et cetera??
Thanks in advance for any insights you all can share!
I suggest you raise this as a Tech Support issue and ask them to escalate this suggestion back to the developers. If enough people do this then it will make the official SASWARE ballot. I have been using SAS long enough to remember when SAS names and tables were expanded from 8 to 32 characters long. User demand was a key driver for this.
In the meantime a quick fix might be to create a SAS dataset list of the longer than 32 character database tables, with a corresponding 32 character SAS name and then create a SAS macro to automatically generate valid SAS SQL views of the database tables from the SAS dataset list.