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

what is the difference between proc means and proc summary?

2 Answers   Accenture,


What is auto call macro and how to create a auto call macro? What is the use of it? How to use it in sas with macros? : sas-macro

0 Answers  


In the flow of DATA step processing, what is the first action in a typical DATA Step?

9 Answers  


i have one dataset data l; input name: $ 25; cards; manoj is a good boy to krishna krishna is a god boy to malli malli is good boy to ramana ques: here i want "manoj" observations nubers

3 Answers   SAS,


If reading an external file to produce an external file, what is the shortcut to write that record without coding every single variable on the record?

4 Answers  






Do you need to know if there are any missing values?

0 Answers  


how to do user inputs and command line arguments in sas?

0 Answers   D&B, TCS,


What is the purpose of _error_?

1 Answers   Quintiles,


What is the basic syntax of a sas program?

0 Answers  


how to remove duplicates using proc sql?

0 Answers  


You have a data set of 100 observations,how can you restrict the output so that the output has only data from row no. 10 to row no. 20

9 Answers  


explain about data integrator metadata reports? : Sas-di

0 Answers  


Categories