LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 1998, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Sat, 13 Jun 1998 12:31:04 GMT
Reply-To:     af <armel.francois@WANADOO.FR>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         af <armel.francois@WANADOO.FR>
Organization: lemra
Subject:      Re: Merge file

First, excuse me for my english ...

It's depends what you want exactly :

1) Only keep the rank who are common to T1 and t2

In this case : (Sort T1 By RANK ,Sort T2 By RANK )

Then use the PROC MERGE : Merge T1 (in=t1) t2(in=t2); By RANK; IF T1 and t2 then do; OUTPUT T3; END;

In this case T3 contains All that is common de t1 and t2

2) Not verify if the RANK exists in the 2 tables

Merge T1 t2; By RANK; OUTPUT T3;

iN this case in T3 3 kinds of observations: a) RANK exists in t1 but not in t2 : ID=... ; AG = .... ; RANK = ... ; WAGE = MISSING; b) RANK exists in t2 but not in t1 : ID=missing ; AG =missing ; RANK = ... ; WAGE = ...; c) RANK exists both i t1 and t2; ID=... ; AG = .... ; RANK = ... ; WAGE = ....;


Back to: Top of message | Previous page | Main SAS-L page