Desktop productivity for business analysts and programmers

Variable Selection: SAS Enterprise Guide & SAS Enterprise Miner – Ask the Expert Q&A

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

Variable Selection: SAS Enterprise Guide & SAS Enterprise Miner – Ask the Expert Q&A

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!  


Accepted Solutions
Solution
‎06-12-2017 08:41 PM
Regular Contributor
Posts: 230

Re: Variable Selection: SAS Enterprise Guide & SAS Enterprise Miner – Ask the Expert Q&A

[ Edited ]
proc sql;
create table have as
select * from want
where initials in('XX', 'XY', 'XO');
quit;

View solution in original post


All Replies
Regular Contributor
Posts: 230

Re: Variable Selection: SAS Enterprise Guide & SAS Enterprise Miner – Ask the Expert Q&A

[ Edited ]

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.

 

Occasional Contributor
Posts: 8

Re: Variable Selection: SAS Enterprise Guide & SAS Enterprise Miner – Ask the Expert Q&A

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 

Solution
‎06-12-2017 08:41 PM
Regular Contributor
Posts: 230

Re: Variable Selection: SAS Enterprise Guide & SAS Enterprise Miner – Ask the Expert Q&A

[ Edited ]
proc sql;
create table have as
select * from want
where initials in('XX', 'XY', 'XO');
quit;
Trusted Advisor
Posts: 1,498

Re: Variable Selection: SAS Enterprise Guide & SAS Enterprise Miner – Ask the Expert Q&A

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).

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 143 views
  • 1 like
  • 3 in conversation