Hello all,
Does anyone have a hint on how I can read just the table names in an entire MS SQL libname into sas?
For example:
proc sql;
create table temp as
SELECT TABLE_NAME
FROM my_lib.[INFORMATION_SCHEMA].[COLUMNS]
WHERE TABLE_NAME LIKE 'xw_%';
QUIT;
I have tried dropping the [], I have tried dropping ".[COLUMNS]"
I have tried making a temp table from the source MS SQL DB on this data, so I can just read a non-schema table directly like any other regular data set. It shouldn't be that hard what am I missing?
last I have tried a proc
print data=sashelp.vcolumn noobs;
var memname name type [... etc];
where libname='my_lib';
run;
This last item seems to have hung my SAS app. I can read and write to this libname for other tables. TIA.
Also for sashelp.vcolumns the entries are case sensitive.
Youve stated table names, is there a reason your not using vtable instead of vcolumn?
Try a proc datasets though sometimes for DB it's all blanks.
See the output from the following.
Proc datasets library=libname;
run;quit;
Also for sashelp.vcolumns the entries are case sensitive.
Youve stated table names, is there a reason your not using vtable instead of vcolumn?
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!
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.