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:         Tue, 5 Aug 2008 18:41:15 -0700
Reply-To:     Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject:      Re: dropping one variable from a huge dataset without recreating
Comments: To: Lou <lpogoda@VERIZON.NET>
In-Reply-To:  <BW6mk.402$7N1.339@trnddc06>
Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes

On Aug 5, 2008, at 6:15 pm, Lou wrote:

>> 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.

On the other hand, if the data set is always rewritten, why this note?

===== Note: You cannot change the length of a numeric column with the ALTER TABLE statement. Use the DATA step instead. =====

What reason could there be for allowing me to change the length of a character variable, but not of a numeric variable.

-- Jack Hamilton jfh@alumni.stanford.org


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