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...

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

Answer Posted / venkatesh

if you use x=1 and y=0
you must use set statement also
try this
data a b;
merge one two;
by id;
if x=1 and y=1 then output a;
if x=1 and y=0 then output b;
data new;
set a b;
run;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the Population you used in your project, is it ITT or PP?

2737


what is star schema? : Sas-di

1123


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.

2198


What is a macro routine?

2709


Are you involved in writing the inferential analysis plan? Tables specfications?

2561


hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

2069


What are the parameters of scan function?

1166


Difference between informat and format?

1084


Explain how merging helps to combine data sets.

1046


How to specify variables to be processed by the freq procedure?

1067


what is the use of sas management console? : Sas-di

1085


Mention the difference between ceil and floor functions in sas?

1143


How do dates work in SAS data?

1165


do you need to know if there are any missing values? : Sas programming

1046


What is the difference between one to one merge and match merge? Give an example.

1059