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.
Author |
Topic |
irfanshirur
Starting Member
21 Posts |
Posted - 2009-12-22 : 05:50:16
|
HiWhat is the Equivelent command for Row_Number(SQL 2005) in SQL 2000.I used the Identity also but we need to store that in temp table, so i dont want to store it in the temp table instead of i want add one more column for my query as row number which will give me incremented number.Query :select column1, column2 from Table1I want one more column at the end which should display the unique number staring from 1.Finally i want to create a view of this query .Please can any one help me out to solve this.thanksregardsMohammed Irfan |
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-12-22 : 05:57:58
|
hitry this..SELECT ROWID=IDENTITY(int,1,1) , column1, column2 Into Table2from Table1 Order by column1select * from Table2-------------------------R... |
|
|
irfanshirur
Starting Member
21 Posts |
Posted - 2009-12-22 : 06:21:55
|
Thanks for reply.This will work but it will create in temp table, so there will not be any performaec issue with this ? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-23 : 01:35:35
|
Where do youi want to show the data?MadhivananFailing to plan is Planning to fail |
|
|
|
|
|