| Date: | Mon, 20 Jun 2011 15:24:10 -0400 |
| Reply-To: | Dan Abner <dan.abner99@GMAIL.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Dan Abner <dan.abner99@GMAIL.COM> |
| Subject: | Rename Variable in PROC SQL XXXX |
|---|
Hello everyone,
What is the simpliest way to rename a variable in PROC SQL? I have the
following code and the AS keyword does not perform as I expected for the
variables that are not calculated or otherwise altered during the step.
PROC SQL;
SELECT id,name AS CNAME,SCAN(add,-3) AS CITY,
SCAN(add,-2) AS STATE,SCAN(add,-1) AS ZIP,
DATEPART(datetime) FORMAT=DATE9. AS BDATE,
cntr AS CENTER,
cre AS CREDIT,
stttt AS STATUS
FROM tbill;
QUIT;
Thank you!
Dan
|