Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 rows selection

Author  Topic 

dass05555
Yak Posting Veteran

55 Posts

Posted - 2008-04-18 : 04:20:45
Dear gurus.,
my problem is i want to get the first row of my record set
into last
without affecting the others rows...


thanks in advance...,

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-18 : 04:36:31
Didnt get you. Are you asking about getting the record in your front end application?
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-04-18 : 04:52:22
Change your ORDER BY clause!

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

dass05555
Yak Posting Veteran

55 Posts

Posted - 2008-04-18 : 05:11:57
yes i'm asking that only...visakh16
Go to Top of Page

dass05555
Yak Posting Veteran

55 Posts

Posted - 2008-04-18 : 05:13:40
i want to get the first row of my record set
as last row,
without affecting the others rows in the record set...
is there any fuction or giv me a solution for this synerio.
Go to Top of Page

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2008-04-18 : 06:14:14
Well, I've got no idea what it is you want, but this was fun anyway...

--data
declare @t table (id int)
insert @t select 1 union select 3 union select 9 union select 17

--calculation
select id from @t order by isnull(nullif(rank() over (order by id), 1), 100000000)

/* results
id
-----------
3
9
17
1
*/
Edit: Just realised this is the SQL 2000 forum, so the above won't work. If the results are the kind of thing you want, say so, and we'll write a SQL 2000 version for you.


Ryan Randall
Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-18 : 07:39:21
What is the front end you're using?
Go to Top of Page
   

- Advertisement -