BookmarkSubscribeRSS Feed
Sathya3
Obsidian | Level 7
proc sql;
create table tablelist as select MEMNAME as table_list from dictionary.tables where libname="S_ICE";
quit;

I have got a note that " 10 tables are not returned as name is too long ".

How can I overcome this problem.I understand that sas datasets have naming constraints and this note is because of that. I cannot pass through sql as dictionary.tables will not be available as shown in example code

 

proc sql;
connect using mylib;
create table t as select * from connection to mylib
(select * from my_table_with_a_name_so_long_that_it_is_longer_than_any_single_line_of_a_program_should_be
);
quit;
2 REPLIES 2
SASKiwi
PROC Star

How long is the table name you are trying to query? Using SQL Passthru as in your example should work to read table names longer than 32 characters which is the SAS table name limit.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 560 views
  • 0 likes
  • 3 in conversation