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 (June 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 13 Jun 2000 15:21:55 +0530
Reply-To:   Deepak Mathur <Deepak.Mathur@ORANGE.CO.IN>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Deepak Mathur <Deepak.Mathur@ORANGE.CO.IN>
Subject:   Re: Rearranging order of variables
Content-Type:   text/plain

Dirk,

Use PROC SQL.

You'd have to write :

proc sql; create table tab1 as select < your order of variables var3,var1,var2 etc > from tab1; quit;

If a dataset repeatedly gets created with a specific variable order , and you want it rearranged, create a view instead.

proc sql; create view view1 as select < your order of variables var3,var1,var2 etc > from tab1; quit;

HTH, Rgds, Deepak

> -----Original Message----- > From: mesotten_dirk@MY-DEJA.COM [SMTP:mesotten_dirk@MY-DEJA.COM] > Sent: Tuesday, June 13, 2000 2:29 PM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Rearranging order of variables > > Hi > > I am searching for the easiest way to rearrange the order of the > variables in my dataset. > e.g. If I have 3 variables called: Var1 Var2 Var3, I want them in a > different order: Var3 Var1 Var2. > > Can anyone here help me?? > > Dirk > > > Sent via Deja.com http://www.deja.com/ > Before you buy. >


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