|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"|
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):
create table Table2 as
select f, d, c, b, a, e
Hope this is helpful,
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
"Nothing is particularly hard
if you divide it into small jobs."
- Henry Ford, Industrialist
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of
Sent: Tuesday, February 04, 2003 10:41 AM
Subject: Ordering output variables........????
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!!
Thanks so much in advance....