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

Suppose there is a SAS dataset with following values -
Parent Child
A B
B C
D E
F G
G H
H I
and so on…..
This goes onto 1000s of observations/rows.
Now how do we identify from this dataset Grandparents and
Grandchildrens ?

Answer Posted / sumit

Suppose the above dataset name is work.old.
Data new;
Set work.old (first obs = 2);
Run;

Proc sql;
Select Old.parent as grandfather, Old. Child as father,
new.child as grandchild from work.Old as old, work.new as
new
where old.child = new.parent;
quit;

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is business intelligence? : Sas-bi

1109


How to include or exclude specific variables in a data set?

1167


What are types of transport files?

8087


What is the differnce between SDTM 3.1.2 to 3.1.1 version

5118


What are the implications?

1788


what other sas products have you used and consider yourself proficient in using? : Sas programming

1167


what are several options for creating reports in web report studio? : Sas-bi

1228


I have a dataset concat having a variable a b & c. How to rename a b to e & f?

1338


How do you connect the desktop application to metadata server? : sas-grid-administration

1147


Explain the special input delimiters used in sas programming.

1050


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

4009


Name some categories in sas 9? : sas-grid-administration

1027


Give e an example of..

2138


name some data transformation used in sas di? : Sas-di

1032


what type of graphs we will create(for 2+years candidates)?

2361