Home Forums SQL Server 2005 T-SQL (SS2K5) Temp Table Name confusion with Nested Procedures? RE: Temp Table Name confusion with Nested Procedures?

  • I got burned on this the hard way. A temp table was created in a trigger. I used a very simple table name like #T for temp.

    I had such a table created in SSMS with the same name I was using for analysis purposes with, of course, a different set of columns.

    When I ran an update on the table with the trigger I kept getting the error with invalid column name.

    I was very embarrassed when I figured out that the trigger was inheriting the #T table on the same connection. Ooops!

    Todd Fifield