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-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!

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.

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