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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 564 views
  • 0 likes
  • 2 in conversation