Library includes datasets..now find variable belong to which table?

Reply
Contributor
Posts: 56

Library includes datasets..now find variable belong to which table?

Library includes datasets..now find variable belong to which table?

how we can find the variable belongs to which dataset ?

Thanks

Shiva

Super User
Super User
Posts: 7,942

Re: Library includes datasets..now find variable belong to which table?

Posted in reply to shivakrishna

Please look at datasets SASHELP.VCOLUMN and SASHELP.VTABLE.  If you want SQL then it is DICTIONARY.COLUMNs and DICTIONARY.TABLE.

Respected Advisor
Posts: 3,799

Re: Library includes datasets..now find variable belong to which table?

Posted in reply to shivakrishna
change 'SASHELP' to your libname and 'AGE' to the variable you seek.
proc sql;
  
select name,memname
  
from dictionary.columns
  
where libname eq 'SASHELP' and upcase(name) eq 'AGE' and memtype eq 'DATA';
  
quit;
  
run;
Ask a Question
Discussion stats
  • 2 replies
  • 299 views
  • 0 likes
  • 3 in conversation