I am using SQL Server 2000 and I want to report on the steps in a job by using a query. There is the procedure sp_help_jobhistory in the msdb database which returns what I want but I need to put the results into a temp table to be able to use them.
Is there a way of creating a temp table from the results of SQL generated in a query?
My second option is to replicate the query the procedure generates but as it refers to system tables I understand that these cannot be guaranteed to remain the same as the can change between service pack versions. This is why I am looking at putting the results of a query generated from a procedure into a temp table if possible… though I think I’m onto a non starter?
Is there a way of creating a temp table from the results of SQL generated in a query?
My second option is to replicate the query the procedure generates but as it refers to system tables I understand that these cannot be guaranteed to remain the same as the can change between service pack versions. This is why I am looking at putting the results of a query generated from a procedure into a temp table if possible… though I think I’m onto a non starter?