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 new features included in the new version of SAS i.e., SAS9.1.3?

5 Answers   College School Exams Tests, Wockhardt,


i am importing large data from oracle to work library. in log there is a error message worklibrary space is not enough. then how to import the data safely to sas environment.

2 Answers   Cap Gemini,


Difference between SAS STATA & SPSS?

0 Answers  


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data set to a second data set, and the non-matches of the right-most data set to a third data set.

10 Answers   Accenture,


Why Info School? BUILD YOUR CAREER WITH RIGHT GUIDANCE AND SUPPORT

0 Answers  






Give e an example of..

0 Answers  


How long can a macro variable be? A token? : sas-macro

0 Answers  


what is sas database server? : Sas-di

0 Answers  


how do u validate the program which u have written.

1 Answers   TCS,


is there any differnce between proc means and proc summary?

5 Answers  


How do you delete duplicate observations in sas?

0 Answers  


What is the differnce between SDTM 3.1.2 to 3.1.1 version

0 Answers   Wipro,


Categories