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 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 19 Aug 2002 12:20:31 -0400
Reply-To:   "Parent, David" <david.parent@CAPITALONE.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Parent, David" <david.parent@CAPITALONE.COM>
Subject:   Re: Adding a column to a SAS dataset:Please help
Comments:   To: ashfaaq <ashfaaq@YAHOO.COM>
Content-Type:   text/plain; charset="iso-8859-1"

Data step approach: data your_new_table; set your_old_table; all_ones=1; run;

SQL approach: proc sql; /*Add the new variable, all_ones, to your table*/ alter table your_table add all_ones num; /*Update the all_ones variable*/ update your_table set all_ones=1; quit;

-----Original Message----- From: ashfaaq [mailto:ashfaaq@YAHOO.COM] Sent: Monday, August 19, 2002 11:50 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Adding a column to a SAS dataset:Please help

I have a SAS dataset where I want to add a column which has all 1's.

The dataset currently has only 1 variable. I want the current variable and another variable with all 1's.

************************************************************************** The information transmitted herewith is sensitive information intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.


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