how to write code for left outer join in SAs using datastep?
Answer Posted / vk
Data Left_outer;
set data1(in=x) data2(in=y);
if x=0 and y=1;
run;
Is This Answer Correct ? | 9 Yes | 12 No |
Post New Answer View All Answers
What is program data vector (pdv) and what are its functions?
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 the difference between SAS functions and procedures?
what are 5 ways to perform a table lookup in sas? : Sas-administrator
describe about physical data integration? : Sas-di
what is sas metadata repository? : Sas-bi
How do you specify the number of iterations and specific condition within a single do loop?
What are the data types that sas contain?
for what purpose would you use the retain statement? : Sas programming
What is SAS?
What is SAS? What are the functions does it performs?
What are the features of SAS?
What was the last computer book you purchased? Why?
what is the limit of the number of the rows and columns available in the worksheet? : Sas-bi
Mention the difference between ceil and floor functions in sas?