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

Post New Answer

More SAS Interview Questions

Hi All.I am looking for Good Institute who could Provide the online SAS BI+DI Training along with software.Primarily in Delhi/NCR or in Hyderabad Please help with name and contact number of concerned person!! Thanks in Advance! :)

1 Answers  


data jagan1.s; input bp$; cards; 100/90 120/89 112/87 run; in the above code how to convert character data values to numeric data values?

3 Answers  


firstobs and obs are working only option wise,but we are using infile statement with firstobs and obs in a statement wise? so firstobs,obs working at options and statemnts or not?

1 Answers  


what is null hypothesis? why do you consider that?

0 Answers   Accenture, Quintiles,


how to write code for left outer join in SAs using datastep?

8 Answers   CitiGroup,






WHAT DOES A SAS SPECIFICATION DOCUMENT SDS CONTAIN ?

1 Answers  


If you could design your ideal job, what would it look like?

0 Answers   Oracle,


Can you excute a macro within a macro? Describe.

3 Answers  


how will you locate the sas platform applications? : Sas-bi

0 Answers  


If you use a symput in a data step, when and where can you use the macro variable? : sas-macro

0 Answers  


What’s the difference between var b1 – b3 and var b1 — b3?

0 Answers  


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data set to a second data set, and the non-matches of the right-most data set to a third data set?

2 Answers  


Categories