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.
No Answer is Posted For this Question
Be the First to Post Answer
Are you familiar with special input delimiters? How are they used?
how to assign a macro value to a variable?
What is the length assigned to the target variable by the scan function?
What would you change about your job?
What is the SAS data set?
how many types of prompts are there? : Sas-bi
what is a post baseline?
what are the scrubbing procedures in sas? : Sas programming
Do you need to combine data sets? How should you combine data sets– MERGE or SET statements in DATA steps,PROC APPEND,PROC SQL?
what other SAS features do you use for error trapping and data validation?
what are the best practices to process the large data sets in sas programming? : Sas-administrator
How to create an external dataset with sas code?