Home Forums SQL Server 2008 SQL Server 2008 - General Query result in SQL Server 2000 return correct and SQL Server 2008 R2 SP2 return wrong RE: Query result in SQL Server 2000 return correct and SQL Server 2008 R2 SP2 return wrong

  • Probably not.

    The order that the query will be processed in is not defined or guaranteed. The SQL 2008 query optimiser is just producing a plan where the conversion is done before the non-numeric values are filtered out.

    The query optimiser changes in every version, therefore plans can change as well

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass