First, the message reminds the user that it is MANY-to-MANY merge in DATA step.
Most SAS progammers are used to ONE-to-ONE or ONE-to-MANY merge since it is easy to understand. When MANY-to-MANY merge occur, the programmer should pay more attention on the data itself.
To perform MANY-to-MANY merge, there are two popular SAS techniques: DATA step and PROC SQL. It should be noted that PROC SQL do not issue the reminder message in MANY-to-MANY merge. Furthermore, it will create a different dataset with the result of DATA step.
Therefore, I suggest that we should perform merge using DATA step.
Showing posts with label Proc SQL. Show all posts
Showing posts with label Proc SQL. Show all posts
Wednesday, March 17, 2010
Thursday, September 3, 2009
Macro variable in PROC SQL
There are two ways to store values of column in PROC SQL.
1. mv with separator, which store values of the rows into one mv
2. mv range, which store value of one row per mv
1. mv with separator, which store values of the rows into one mv
2. mv range, which store value of one row per mv
* Sample code;
proc sql;
select distinct sex, name
into:sex seperated by ' ', :name1-:name100
from sashelp.class;
%let num = &sqlobs;
quit;
%put Number: &sqlobs;
%put _global_;
Subscribe to:
Posts (Atom)