| Date: | Tue, 4 Feb 2003 11:05:08 -0800 |
| Reply-To: | Mark Terjeson <mark.terjeson@NWCSR.COM> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | Mark Terjeson <mark.terjeson@NWCSR.COM> |
| Subject: | FW: Ordering output variables........???? |
| Content-Type: | text/plain; charset="us-ascii" |
Hi Mike,
No problem asking. This is always a good question.
This is one of the most commonly asked questions,
and there are several methods of doing this. Some
use RETAIN, etc. for a datastep solution (which you
have to *tell* the datastep to force the order), and
here is an SQL solution (where the SELECT always puts
the order as you ask it to):
proc sql;
create table Table2 as
select f, d, c, b, a, e
from Table1;
quit;
Hope this is helpful,
Mark Terjeson
Northwest Crime and Social Research, Inc.
A SAS Alliance Partner
215 Legion Way SW
Olympia, WA 98501
360.870.2581 - voice,cell
360.570.7533 - fax
mailto:mark.terjeson@nwcsr.com
www.nwcsr.com
"Nothing is particularly hard
if you divide it into small jobs."
- Henry Ford, Industrialist
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Mike Cohen
Sent: Tuesday, February 04, 2003 10:41 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Ordering output variables........????
Hello,
I have what I think should be an easy question to answer, yet I cannot
seem to find the answer anywhere.
I have a dataset with the following output variables: a b c d e f
On the report generated by SAS, the order of the variables is such:
a b c d e f
Yet, I want the report to read as such:
f d c b a e
I cannot, for the life of me, figure this out!!
Please help!
Thanks so much in advance....
Mike
|