You need to create an In List that it is to be later used in
a Where Clause that includes all the Regions that begin with
the letter A from the sashelp.shoes table. Using PROC SQL
with an into clause create the following string from the
sashelp.shoes table using the variable region
“AFRICA”,”ASIA”,…..

Answers were Sorted based on User's Feedback



You need to create an In List that it is to be later used in a Where Clause that includes all the R..

Answer / ragg

here is the code for your question.
proc sql;
select *
from sashelp.shoes
where Region like 'A%';
quit;
it will list out all letters starting with 'A'in region variable.

Is This Answer Correct ?    15 Yes 3 No

You need to create an In List that it is to be later used in a Where Clause that includes all the R..

Answer / vema reddy dwarampudi

Please add from clause in the above code
proc sql noprint;
select "'"||left(trim(Region))||"'" into :inlist separated
by ','
from sashelp.shoes
where Region like 'A%';
quit;

Is This Answer Correct ?    1 Yes 0 No

You need to create an In List that it is to be later used in a Where Clause that includes all the R..

Answer / vema reddy dwarampudi

proc sql noprint;
select "'"||left(trim(Region))||"'" into :inlist separated
by ','
where Region like 'A%';
quit;

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More SAS Interview Questions

HOW MANY WAYS YOU CAN RETRIEVE THE DATA FROM ORACLE TABLES? WHAT IS ORACLE CLINICAL? HOW IT IS USEFUL?

3 Answers   Accenture, Novartis,


name the scheduler for scheduling job and explain the scheduler? : Sas-di

0 Answers  


what is washout period?

3 Answers   Cognizant,


what other sas products have you used and consider yourself proficient in using? : Sas programming

0 Answers  


Can you execute a macro within a macro? Describe. : sas-macro

0 Answers  






Differentiate between format and informat? : sas-grid-administration

0 Answers  


if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...

0 Answers   Accenture,


How do you put a giraffe into the refrigerator?

3 Answers   Oracle,


How to get the repeated values by using sql in sas ?

2 Answers  


What areas of SAS are you most interested in?

0 Answers   Quintiles,


What is the purpose of trailing @ and @@? How do you use them?

0 Answers  


In a shcool there are 1000 students. After completion of every test in 6 subjects , each subject teacher submit the marks of every student at different times and loaded in the database commonly. How will you seperate the top two subject marks for each each studet using SAS?

6 Answers  


Categories