BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi all,

I'm trying to get column names into a SAS table. For example if my Table A has the following columns:

T100 T200 T300 T400 T500

I would like to create Table B, that contains only column names, i.e.:

Columns
T100
T200
T300
T400
T500

Thank you ahead of time for your help!
Rich
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
There are -many- previous forum postings on the use of the DICTIONARY information to perform tasks like this. In addition, you can search on Google for user group papers on the use of the DICTIONARY tables. Here's just one example.

cynthia
[pre]
proc sql;
** make table to use later;
create table work.shoecols as
select name
from dictionary.columns
where upcase(libname) = "SASHELP" and
upcase(memname) = "SHOES";
quit;

ods listing;
proc print data=work.shoecols;
title 'after proc sql';
run;
[/pre]

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 634 views
  • 0 likes
  • 2 in conversation