BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ybz12003
Rhodochrosite | Level 12

Hello,

 

I have around twenty different answers in one column 'A'.   Column A is in text format.   I would like to get a full list for all of them.   Any idea how?  Basely, I would like to use the method to apply for the other ten variables.   Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

How about this:

 

proc sql;
     select distinct a from mydataset;
quit;
--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

The simple answer is that PROC PRINT will create such a list.

 

Can you be more specific about what you mean by "a full list"?

--
Paige Miller
ybz12003
Rhodochrosite | Level 12

No, I only the 20 different answers, not the full list of 500 rows.  

PaigeMiller
Diamond | Level 26

How about this:

 

proc sql;
     select distinct a from mydataset;
quit;
--
Paige Miller
ybz12003
Rhodochrosite | Level 12

Awesome!!Woman Very Happy

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 980 views
  • 2 likes
  • 2 in conversation