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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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