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 (August 2008, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 6 Aug 2008 01:15:13 GMT
Reply-To:   Lou <lpogoda@VERIZON.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Lou <lpogoda@VERIZON.NET>
Subject:   Re: dropping one variable from a huge dataset without recreating
Comments:   To: sas-l@uga.edu

<hs AT dc-sug DOT org ("Howard Schreier)> wrote in message news:200808050121.m74Ilim5019094@malibu.cc.uga.edu... > On Tue, 5 Aug 2008 00:40:09 GMT, Lou <lpogoda@VERIZON.NET> wrote: > > ><hs AT dc-sug DOT org ("Howard Schreier)> wrote in message > >news:200808040153.m73AlDCD015752@malibu.cc.uga.edu...

> >> PROC SQL claims to be able to do this. To illustrate: > >> > >> proc sql; > >> create table demo as > >> select * > >> from sashelp.class; > >> alter table demo > >> drop age, weight; > >> quit; > >> > >> Log shows: > >> > >> NOTE: Table WORK.DEMO has been modified, with 3 columns. > >> > >> However, evidence indicates that behind the scenes PROC SQL transcribes > >the > >> body of the table, so you will end up incurring the cost of re-creating. > > > >PROC SQL makes no such claim > > The first sentence of the doc page for ALTER says "Adds columns to, drops > columns from, and changes column attributes in an existing table." > (http://tinyurl.com/56qm6p or > http://support.sas.com/onlinedoc/913/getDoc/en/proc.hlp/a002473671.htm).

Well, I guess you could construe that sentence to mean it drops columns from a table "in place", that is without rewriting the entire dataset. However, you could make the same statement about the following DATA step (as far as dropping a column is concerned at any rate)"

DATA FEE (DROP = FIE); SET FEE; RUN;

Neither the DATA step nor PROC SQL appear to get rid of a column without rewriting the table/dataset. If you make your test table/dataset large enough that the process takes a minute or three, you can open a Windows Explorer window on the library containing the file and by clicking on View>Refresh a few times, watch it happening.


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