Home Forums SQL Server 2008 SQL Server Newbies Storing range of varchar values into variable for future filtering in query RE: Storing range of varchar values into variable for future filtering in query

  • Table variables can work, but understand that they don't have statistics which could affect their use in something like a JOIN. You might be better off using a temporary table. That does have statistics created on it.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning