row number or index
-
hi, i have a team_standing_table that is ordered by points and wins etc. i would like to know the row number or position of a particular team. what is the row number that has man utd? or chealsea? (How to get the team in 1st,2nd, 12th etc i already know not the issue here) Thanks :doh:
-
hi, i have a team_standing_table that is ordered by points and wins etc. i would like to know the row number or position of a particular team. what is the row number that has man utd? or chealsea? (How to get the team in 1st,2nd, 12th etc i already know not the issue here) Thanks :doh:
assuming SQL Server 2005, add the following column
ROW_NUMBER() OVER(ORDER BY Points)
Never underestimate the power of human stupidity RAH
-
hi, i have a team_standing_table that is ordered by points and wins etc. i would like to know the row number or position of a particular team. what is the row number that has man utd? or chealsea? (How to get the team in 1st,2nd, 12th etc i already know not the issue here) Thanks :doh:
SELECT ROW_NUMBER() OVER (ORDER BY team_name ASC) AS ROWID, * from teams
where team_name like '%man utd%'ROWID will give u the row number chilll ;) remember me in your prayers take care FEEAMANALLAH
AHSAN SARFRAZ UNIVERSITY OF ENGINEERING AND TECHNOLOGY TAXILA PAKISTAN COMPUTER SYSTEM ENGINEERING DEPARTEMENT