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

Beginner here. Unfortunately a bit overhhelmed and new to coding.  I would like to be able to select multiple cases and create a table of them.  I understand that creating a table I need to use this:   

 

proc sql; select * from ____.__ where initials = 'XX'; quit;
proc sql; create table test as select * from _____.______ where initials = 'XX'; quit;

 

But I would like to find multiple individuals

Thank you in advance!  

1 ACCEPTED SOLUTION

Accepted Solutions
kiranv_
Rhodochrosite | Level 12
proc sql;
create table have as
select * from want
where initials in('XX', 'XY', 'XO');
quit;

View solution in original post

4 REPLIES 4
kiranv_
Rhodochrosite | Level 12

below is the link for free Proc SQL session, which may be helpful for you. You just need to register and you can listen to an excellent session.

s://www.sas.com/en_us/webinars/sql-introduction/register.html

Please give some more details, so that someone call help you. How your sample dataset looks like and how your result dataset look like.

 

Lauban
Fluorite | Level 6

Thanks for your help I will check that session out. 

 

My data set looks like 

Initials DOB Variable 1 Variable 2

XX          _         1                  2  

XY          _         3                  4

XO         _          4                  5

.

.

 

I would like to find XX, XY, XO and have a table of their variables in the results viewer 

kiranv_
Rhodochrosite | Level 12
proc sql;
create table have as
select * from want
where initials in('XX', 'XY', 'XO');
quit;
PaigeMiller
Diamond | Level 26

It makes no sense to have a title on this thread "Re: Variable Selection: SAS Enterprise Guide & SAS Enterprise Miner -- Ask the Expert Q&A", as this question has nothing to do with Enterprise Guide, nothing to do with Enterprise MIner, and nothing to do with "variable selection". This is not a variable selection question, this is a question about selecting observations or rows (not variables).

--
Paige Miller

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1361 views
  • 1 like
  • 3 in conversation