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”,…..
Answer Posted / 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 |
Post New Answer View All Answers
data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.
what is function of retain statment
What do you code to create a macro? : sas-macro
Name few SAS functions?
Differentiate between format and informat? : sas-grid-administration
Explain the purpose of substr functions in sas programming.
What are the implications?
: and & modifiers.
How would you define the end of a macro? : sas-macro
What does proc print, and proc contents are used for?
What’s the difference between var b1 – b3 and var b1 — b3?
What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?
how does sas handle missing values in functions? : Sas programming
What are the best sas programming practices for handling very large datasets? : sas-grid-administration
Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager