Home Forums SQL Server 2014 Development - SQL Server 2014 Odd 'Invalid object name' issue with temp tables RE: Odd 'Invalid object name' issue with temp tables
cunningham
SSCarpal Tunnel
Points: 4595
More actions
May 28, 2015 at 8:30 am
#1801271
Because when you first run it, the table doesn't exist, so the if statement returns 'invalid object' in the background.
The next time you run the whole statement, the table does exist because the first run created. As such no error message.