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 (December 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 12 Dec 2007 08:53:32 -0800
Reply-To:     "shaunak.adgaonkar@gmail.com" <shaunak.adgaonkar@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "shaunak.adgaonkar@gmail.com" <shaunak.adgaonkar@GMAIL.COM>
Organization: http://groups.google.com
Subject:      rename variable name in SQL
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

Guys, I have used a code in proc sql and it generated the new table with column name as a number now i want to rename it but i am not able to do it . The code is as follows

create table mylib.licb as SELECT AMOUNT, COMPANY, ACCOUNT, PRODCDE, CASE WHEN ACCOUNT IN ('424300', '424100', '424150') AND PS_PRODCODE IN ('PERMX', 'TERMX') THEN 'A. Life Insurance:' WHEN ACCOUNT IN ('424000') AND PRODCODE IN('PERMX', 'TERMX') THEN 'B. Life Insurance:'

FROM FIN_MGT ));

LICB is created as

AMOUNT Company Account Prodcode 5 100 ABC 424300 PERMX A. Life Insurance 200 DEF 424000 TERMX B.Life Insurance

Now i am wondering how to rename this variable named 5. Have tried proc sql alter table and other options also but was not able to change it because the name itself is a number. Does anyone have experienced same situation prior, any help appreciated


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