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 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 28 Aug 2007 02:09:01 -0400
Reply-To:     Dimitri Shvorob <dimitri.shvorob@VANDERBILT.EDU>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Dimitri Shvorob <dimitri.shvorob@VANDERBILT.EDU>
Subject:      Re: CREATE TABLE recursively references the target table

Chang, you got it, thanks! (The example is all the more intriguing as

create table a as select * from (select age from a);

(I replaced 'select 14 as age' with 'select age') runs OK.

Also thanks to Paul and Howard! To answer Paul's (implicit) question,

I cannot see why creating a table using a recursive reference to its former self would be necessary. If the goal is to update a master file, other instruments are better suited for the purpose.

I use recursive CREATE TABLE to add columns to existing tables

create table a as select *, 14 as age from a;

(age could also come from a different table).

Admittedly, ADD COLUMN .. UPDATE would be more efficient.


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