Hi, I am using SAS EG 4.3. "For a merge with a BY statement, your data needs to be sorted, either by using PROC SORT or having data that is in sorted order already, or indexed using the BY variables." But, when I use PROC MERGE to merge 2 tables from Netezza, I can skip over the step of PROC SORT. The output is correct and sorted. Why? Are the tables from Netezza pre-defined by something? For example, (Netez is a libref for a Netezza database. 1st, create 2 tables in Netezza; 2nd, use PROC MERGE) Data Netez.A1; Input ID Mth Name$ Height; cards; 7 5 D 2 1 1 A 1 3 2 B 2 9 5 E 2 5 3 C 2 ; run; Data Netez.A2; Input ID Mth Name$ Weight; cards; 5 3 C 4 2 1 A 2 7 5 D 5 4 2 B 3 ; run; data dummy; merge Netez.A1 (in=x) Netez.A2 (in=y); by id; if x; run;
... View more