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 the use of proc glm

1 Answers   Accenture, C Marc,


what is pdv? how it is related to input buffer in sas?

5 Answers   HSBC, Satyam,


how to extract data from SAP servers? Is like oracle servers or any other methods to extract please reply me.

1 Answers  


/* To determine the maximum and minimum of V1 */ data before3; input v1 v2 v3; cards; 3 2 1 4 6 5 2 1 3 6 5 4 1 3 2 5 4 6 ; run;

5 Answers  


How could you generate test data with no input data?

6 Answers   Quintiles,


How could you generate test data with no input data?

14 Answers   CTS,


How do you debug macros?

3 Answers   Accenture,


what is data integration? : Sas-di

1 Answers  


How do you write a test plan?

1 Answers   Oracle,


What do the PUT and INPUT functions do?

1 Answers  


What is LOGICAL VARIABLES in SAS.And how it can be used..Can anyone support..???

3 Answers  


What is the maximum length of the macro variable?

1 Answers  


Categories