Good afternoon,
I have a library with more tables i need to create a new table who contains all the names of columns (of all tables) and in wich table the column name is contained.
Can you suggest something?
Tnks!!!!
Tecla
The work is already done for you. Use the DICTIONARY table.
proc sql;
create table want as select * from dictionary.columns;
quit;
proc sql; create table want as select * from dictionary.columns where libname='YOURLIB' ; quit;
The libname (as well as memname for datasets) is stored in the dictionary view in all upper case so either provide the name in upper case or use other method to ensure your name value and the libname is the same case for comparison
Alternatively with a dataset
data want;
set sashelp.vcolumn;
where libname='WORK';
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.