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 are the scrubbing procedures in sas?

1006


Explain the difference between informat and format with an example.

1168


how do the in= variables improve the capability of a merge? : Sas programming

1436


How long can a macro variable be? A token? : sas-macro

1214


What would you change about your job?

2388


what are sas/access and sas/connect? : Sas programming

993


explain what is factor analysis? : Sas-administrator

1112


What are the prime responsibilities of data integration administrator? : Sas-di

1069


What is the difference between nodupkey and nodup options?

1038


What is your favorite all time computer book? Why?

2509


What are the limitations for memory allocation for SAS variables

1492


How do you add a number to a macro variable? : sas-macro

1009


How to convert a numeric variable to a character variable?

1209


which features do you use to check the data validations and errors? : Sas-administrator

1056


explain about various caches available in data integrator? : Sas-di

1050