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 are the special input delimiters used in SAS?

0 Answers  


Name types of category in which SAS Informats are placed?

0 Answers  


data voter; input Age Party : $1. (Ques1-Ques4)($1. + 1); datalines; 23 D 1 1 2 2 45 R 5 5 4 1 67 D 2 4 3 3 39 R 4 4 4 4 19 D 2 1 2 1 75 D 3 3 2 3 57 R 4 3 4 4 ; Idont understand what the (Ques1-Ques4)($1. + 1) means. I have seen (Ques1-Ques4)(4*$1.), but what is (Ques1-Ques4)($1. + 1)? Appreciate all help Thanks

3 Answers  


in which companies SAS openings are there? List of companies using SAS technology.

14 Answers   MIR-IFCR, TCS,


what is information maps?

0 Answers   CitiGroup,






How would you define the end of a macro?

0 Answers  


how could you generate test data with no input data? : Sas programming

0 Answers  


what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming

0 Answers  


what is star schema? : Sas-di

0 Answers  


% let A=3+4 what is result

4 Answers   Satyam,


How would you invoke a macro? : sas-macro

0 Answers  


proc means? proc sort? proc append? proc freq? proc print? proc content?

4 Answers   Oracle,


Categories