DATA Step, Macro, Functions and more

How to move a row to Top row

Accepted Solution Solved
Reply
Super Contributor
Posts: 406
Accepted Solution

How to move a row to Top row

Hi Everyone,

 

I would like to move the row Total to the Top of the table but of course sort will not help.

Can you help me with it?

Thanks so much and have a nice weekend.

HHC


data have;
input name $ Num;
cards;

a 1
b 2
total 11111
zz 4
ww 5
;


Accepted Solutions
Solution
‎04-29-2016 11:49 PM
Super User
Posts: 5,497

Re: How to move a row to Top row

This should do it:

 

data want;

set have (where=(name='total'))

   have (where=(name ne 'total'));

run;

View solution in original post


All Replies
Solution
‎04-29-2016 11:49 PM
Super User
Posts: 5,497

Re: How to move a row to Top row

This should do it:

 

data want;

set have (where=(name='total'))

   have (where=(name ne 'total'));

run;

Super Contributor
Posts: 406

Re: How to move a row to Top row

Posted in reply to Astounding

Oh, that's amazing, Astounding!

Thanks.

HHC

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 234 views
  • 0 likes
  • 2 in conversation