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 |
|
derach2000
Starting Member
37 Posts |
Posted - 2010-05-10 : 04:21:10
|
| Hi,I need a way to get a row number in te query result.I have a temp table that is populated with data for a certain user. I cant use identity and truncate metod, becouse there can be many users using it and cause a big problem.So, the data, before insert, is being deleted for a certain user. Then the new data will bi inserted, and I need a row number.I'm using SQL2000 right now, so I cant use ROW_NUMBER() function.So what should I do, use trigger after insert or use #Temp with identity column, or is there another way. |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-05-10 : 04:48:16
|
| Where do you want to show data?If you use front end application, do numbering thereMadhivananFailing to plan is Planning to fail |
 |
|
|
derach2000
Starting Member
37 Posts |
Posted - 2010-05-11 : 05:02:01
|
| Hi,Numbering is needed in the database, becouse the application depends on it.I have implemented a scenario with a #Temp table and identity column, for now. |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-05-11 : 05:02:55
|
quote: Originally posted by derach2000 Hi,Numbering is needed in the database, becouse the application depends on it.I have implemented a scenario with a #Temp table and identity column, for now.
Have you check my previous post?Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
derach2000
Starting Member
37 Posts |
Posted - 2010-05-11 : 09:19:51
|
| Hi,very interesting. You count the elements. I'll have to check which one of thees method is faster. |
 |
|
|
|
|
|
|
|