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 (November 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 1 Nov 2006 15:01:39 -0500
Reply-To:   "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>
Subject:   Re: joining tables- one table below another
Comments:   To: sas-l@uga.edu

oercim wrote: > I want join these tables such "one table below another table" using > PROC SQL statements.

The safest way to stack tables in SQL is to use OUTER UNION CORRESPONDING. SQL can stack upto 32 tables at a time. Various problems can occur when same named columns in different tables have different attributes (type, length, format, label, etc.)

-------------------------------------------- Proc SQL; create table stacked as select * from table1 OUTER UNION CORRESPONDING select * from table2 ... OUTER UNION CORRESPONDING select * from table32 ; quit; --------------------------------------------

OUC is operationally equivalent to SET table1 table2 ... tableN;

-- Richard A. DeVenezia http://www.devenezia.com/


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