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 2005, 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 Jun 2005 15:50:34 -0400
Reply-To:     "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Howard Schreier <hs AT dc-sug DOT org>" <nospam@HOWLES.COM>
Subject:      Re: Best way to union(concatenate several datasets) Proc SQL Or
              Proc Append

The bare UNION operator detects and eliminates duplicate rows. This will take an appreciable amount of time. Use the ALL option to get a result equivalent to concatenation performed by the DATA step or PROC APPEND.

With SQL, you must all consider the order of the variables. Unless you know that the variables are ordered the same in all of your tables, you would need the CORRESPONDING option.

On Wed, 1 Jun 2005 11:09:51 -0700, Mark <joystar.jin@GMAIL.COM> wrote:

>I need to union(concatenate) 9-10 datasets. Each has same number of >variables and all the variables are same. > >I am wondering what is the quickest way to union(concatenate) a big >number of datasets? > >Proc SQL can use UNION statement like: > >Proc SQL; >(select * from a) >union >(select * from b) >union >(select * from c); >quit; > >But can I union 9-10 datasets at one time? Would that take long time? > >If I use Proc Append? I can only append one dataset at a time, right? >Would it be more time consuming? > >Thanks, > >Mark


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