I am using SQL Server 2012 and I have a query which returns two columns, the Item number and the Row number of that item in the query:
Row Item
--------------
1 1234
2 5632
3 4213
4 0912
Before I run the query I will know that I am only interested in the row containing Item 5632 and X number of rows following the one containing item 5632 (in this case lets just say rows 2 and 3). However, I will not know ahead of time what row Item 5632 is in.
I would like to somehow say
Where Row >= Row of Item 5632
And Row <= Row of Item 5632 + X
Is this possible to do? Thank you all!