I'm just reading my company's code guidelines and it says to never treat variables as a constant in sql server, use literals instead. The reasoning is that sql server can't build a good execution plan when you're using variables in the query.
Anybody know if this is still true? We're using MSSQL 2005 and this document may have been written for 2000.