how to write code for left outer join in SAs using datastep?
Answer Posted / raghava
proc sql;
select *
from one left join two
on one.X=two.X;
quit;
The above is code for lefjoin.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What does the RUN statement do?
Explain what is data step?
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
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 does PROC print, and PROC contents do?
What Proc glm does?
explain about data integrator metadata reports? : Sas-di
How do you control the number of observations and/or variables read or written? Approximately what date is represented by the SAS date value of 730?
why is sas data integration studio important? : Sas-di
What is the order of application for output data set options, input data set options and SAS statements?
What is the difference between class statement and by statement in proc means?
What are the implications?
Given an unsorted data set, how to read the last observation to a new data set?
Explain by-group processing?
How many ways to overcome a missing values???