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?

Answers were Sorted based on User's Feedback



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

Answer / uma

first sort these datasets by common variable DEPT_ID,Then
use the following:
data left_join;
merge emp (in=a) dept (in=b);
by dept_id;
if a then output;
run;

Is This Answer Correct ?    22 Yes 2 No

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

Answer / aniruddha

Data left_outer;
merge emp(in=a) dept(in=b);
by deptno;
if a=1 and b=0;
run;

Is This Answer Correct ?    22 Yes 8 No

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

Answer / lakshmi

data left_join;
merge data1(in=a) data2(in=b);
by subjid;
if a;
run;

Is This Answer Correct ?    10 Yes 3 No

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

Answer / jbhjhj

dnt use set it wnt work.
use merge with in statements as above.

Is This Answer Correct ?    8 Yes 6 No

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

Answer / 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

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

Answer / raghava

proc sql;
select *
from one left join two
on one.X=two.X;
quit;

The above is code for lefjoin.

Is This Answer Correct ?    1 Yes 0 No

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

Answer / 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

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

Answer / pnprasad

There is no such Inner & Left Joins. In SAS only one join
i.e Right Join. If you want Left Join you have to use the
data set in the second place. For example: D1 D2 are the
data sets for D2 you want to make, UPDATE D1 D2;

Is This Answer Correct ?    1 Yes 22 No

Post New Answer

More SAS Interview Questions

what is the use of catalog?

1 Answers   Cognizant,


data voter; input Age Party : $1. (Ques1-Ques4)($1. + 1); datalines; 23 D 1 1 2 2 45 R 5 5 4 1 67 D 2 4 3 3 39 R 4 4 4 4 19 D 2 1 2 1 75 D 3 3 2 3 57 R 4 3 4 4 ; Idont understand what the (Ques1-Ques4)($1. + 1) means. I have seen (Ques1-Ques4)(4*$1.), but what is (Ques1-Ques4)($1. + 1)? Appreciate all help Thanks

3 Answers  


Differentiate input and infile.

0 Answers  


explain the function of substr in sas? : Sas-administrator

0 Answers  


What are the features of SAS?

0 Answers  


Can you suggest us materials for sdtm mapping?

0 Answers   TCS,


how to extract data from SAP servers? Is like oracle servers or any other methods to extract please reply me.

1 Answers  


Describe 5 ways to do a “table lookup” in SAS?

0 Answers  


Which is the best place to learn SAS clinicals and Oracle clinical in hyderabad?

2 Answers  


Which are the statements whose placement in the data step is critical?

0 Answers  


what is the purpose of _error_? : Sas programming

0 Answers  


What is the difference between SAS Data step and SAS PROC SQL, and which is better?

1 Answers   TCS,


Categories