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