• Bhuvnesh (11/12/2012)


    Langston Montgomery (11/11/2012)


    I'm embarrassed to say that it turns out to be a version issue. We ran the same code on a different server with 2008 R2 SP1, and it ran fine. The initial server is still on the RTM version of 2008 R2.

    but still ?? how that different version gives diferent/incorrect data ? or you want to say that you have different code/data on both servers

    The code and the data is exactly the same between both servers. One server is production and the other is UAT. We refresh UAT from production every week. On the RTM version of '08 R2, when using the NOLOCK hint, it returns bad rows with values that don't match between fields of an equi-join. After removing the NOLOCK hint, it works fine.

    On the SP1 version of '08 R2, the query returns the correct results regardless of NOLOCK.

    I'm just going to chalk it up as an issue that is corrected with the right version of SQL.