Never, never forget to add the COLLATION of your temporary tables when you write MS-SQL server stored procedures. If you forget to do that and you ever migrate from say SQL Server 2005 to SQL Server 2000 some database, you end up doing the following: