I want to create a global temp table in a SQL Server Agent Job.
Here is the code:
CREATE TABLE ##TestEmployee(Id int, EmployeeName nvarchar(50))
When I execute in SSMS, all is well.
I then put the above code on a SQL Agent Job. The job will complete successfully, but when I try doing a select statement in SSMS, I get an
Invalid Object error.
SELECT * FROM ##TestEmployee
Are there any gotchas I am missing by creating a global temp table in SQL Server Agent?