|Date: ||Wed, 5 Jul 2000 12:41:43 -0500|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||"H. T. Cheng" <hcheng@ERAC.COM>|
|Subject: ||Re: "PROC SQL", "PROC SORT + MERGE"|
|Content-Type: ||text/plain; charset="iso-8859-1"|
Since someone mentioned duplicates, I'd like to bring it to your attention
that Proc SQL and data step MERGE treat m to n match quite differently. You
need to be careful when you have to deal with the situation.
id = 1005; x = 1 ; output;
id = 1005; x = 2; output;
id=1005; y = 10 ; output;
id=1005; y = 20; output;
id=1005; y = 30; output;
How many observations do you expect from the results of proc sql and data
step merge?(assuming that both the sql join and data step merge are based on
the id key variable).
Someone on this L wrote a SUGI paper on this issue and he strongly suggested
using the SQL. I also heard that SAS will make the data step merge the same
as the SQL join.