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)
 Equalent to Row_Number()

Author  Topic 

Aiby
Yak Posting Veteran

71 Posts

Posted - 2007-08-31 : 12:55:36
is there any mechanism to generate Row Numbers along with SELECT fields.. like Row_Number() function in 2005 server..?
Thank you ...

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-08-31 : 13:33:47
There is no built in function as such but you can mimic it if you have any PK in your SELECT query.


Dinakar Nethi
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-08-31 : 13:34:19
best way is to insert data into a temp table which also has identity number.

why do you need it?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

Aiby
Yak Posting Veteran

71 Posts

Posted - 2007-08-31 : 16:05:33

:) Thank you..! No i was just checking is there any such or similar functions like !! Any way.. Thank you..
quote:
Originally posted by spirit1

best way is to insert data into a temp table which also has identity number.

why do you need it?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp



Aiby Mohan Das
Analyst Programmer
Decibel Infotech P.Ltd.
Kerala, India
Email: Aiby@hotmail.com
Go to Top of Page
   

- Advertisement -