Can't drop temp table

  • SELECT name FROM tempdb..sysobjects WHERE name like N'#tempNumStores%' AND type = 'U'

    Returns a record but when I try to execute drop table #tempNumStores I get an error saying "Server: Msg 3701, Level 11, State 5, Line 1

    Cannot drop the table '#tempNumStores', because it does not exist in the system catalog."

    Is there a way to drop a table based on the ID in tempdb? Or am I completely missing something? I need to drop this table...

    Thanks,

    Chris

  • you should also check the owner of the table, and execute the delete also with the owner

  • Check the Table owner and try to drop it will fully qualified path e.g. tempdb.ownername.tablename

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply