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

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 4 replies
  • 395 views
  • 2 likes
  • 2 in conversation