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 |
|
tanvirasad
Starting Member
10 Posts |
Posted - 2007-03-28 : 01:12:18
|
| I have a Data of E.G 10 Rows And I want To know the row position of the first record in the table fetched by the query. When I run a query " Select ColA, ColB from Tab1 Where ColA = 'TY' " I would like to know the row poition of the above record.ColA ColBXY 124BG 122YY 129JK 324LO 134TY 824AF 424YH 126WE 200EN 450TH 461YV 551Tanvir Asad |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-03-28 : 01:23:16
|
the row position have no meaning unless you use ORDER BY. KH |
 |
|
|
tanvirasad
Starting Member
10 Posts |
Posted - 2007-03-28 : 01:28:31
|
| How it helps if I use the Order by clause.Tanvir Asad |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-03-28 : 01:33:33
|
| Then you can use the new ROW_NUMBER() function available in SQL Server 2005.Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|
|