Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.



data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 12..

Answer / aravind rangaraj

if u result look like as follows,its correct result only..
just chk d info observation by observation..
each date in data1 is satisfied..u r confused????
if any output u hav expected just write the output..

output:

dt account startdt enddt total
11OCT1964 1230 15JUL1964 08JAN1965 12300
22OCT1964 1120 15JUL1964 08JAN1965 12300
23NOV1964 1130 15JUL1964 08JAN1965 12300
02NOV1964 1240 15JUL1964 08JAN1965 12300
11OCT1964 1230 06APR1964 24OCT1964 16800
22OCT1964 1120 06APR1964 24OCT1964 16800

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More SAS Interview Questions

How to Rename Library?

3 Answers  


How many missing values are available? When might you use them?

1 Answers   Quintiles,


if you have 365 no of data set and each one having different variable from each other. how will you read by creating macros and create a single data set.

2 Answers  


How would you invoke a macro? : sas-macro

0 Answers  


What is the use of the %include statement?

0 Answers  


What is substr function?

0 Answers  


What are the differences between sum function and using “+” operator?

0 Answers  


Explain why double trailing @@ is used in input statement?

0 Answers  


In the flow of DATA step processing, what is the first action in a typical DATA Step?

6 Answers   Accenture,


what is the difference between sas and other datawarehousing languages?what are the advantages of sas over them?

2 Answers   Accenture, Infosys,


what is prime numbers? how we can get plc write sas code?

5 Answers   Icon,


What are the main differences between sas versions 8.2, 9.0, 9.1?

4 Answers  


Categories