• Since there is not such thing as row beneath another row, I assume that you meant that you want the identity value that has 3 different values between it and the current identity value that you are looking at. If I'm correct, then you can have a CTE that selects the top 4 records from the table where the ID value is smaller then the ID of your current row order by the ID desc. From the CTE you can select the min(ID). If you would have written a script with the table structure and insert some test data, I would have written a code that demonstrates that.

    Another option if to use ranking functions and get the record number that you want.

    Adi

    --------------------------------------------------------------
    To know how to ask questions and increase the chances of getting asnwers:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/