I am new to DTS and need help trying to execute a stored procedure in my DTS package. My sp creates a temporary table which I need to reference later in the DTS package.
I have tried executing the sp in a 'Execute SQL Task' but when I try to SELECT records from the temp table (in a later step)it says the Table doesn't exist. What I am doing wrong?
My stored procedure....
CREATE PROCEDURE dbo.sp_test
AS
SET NOCOUNT ON
CREATE TABLE ##SOME_TABLE
(
Description varchar(50) not null,
Lastnam varchar(30) not null,
Firstnam varchar(30) not null,
Entered varchar(5) not null,
Worked varchar(5) not null,
LT_24 varchar(5) not null,
GT_24 varchar(5) not null,
First_Level varchar(5) not null
)
<sql code...>
INSERT INTO ##some_table
VALUES (@Description, @Lastnam, @Firstnam, Convert (varchar, @Number_Entered), Convert(varchar, @Number_Closed),
Convert(varchar, @First_Level_Temp), Convert(varchar, @Number_Lt24), Convert(varchar, @Number_Gt24))
I have tried executing the sp in a 'Execute SQL Task' but when I try to SELECT records from the temp table (in a later step)it says the Table doesn't exist. What I am doing wrong?
My stored procedure....
CREATE PROCEDURE dbo.sp_test
AS
SET NOCOUNT ON
CREATE TABLE ##SOME_TABLE
(
Description varchar(50) not null,
Lastnam varchar(30) not null,
Firstnam varchar(30) not null,
Entered varchar(5) not null,
Worked varchar(5) not null,
LT_24 varchar(5) not null,
GT_24 varchar(5) not null,
First_Level varchar(5) not null
)
<sql code...>
INSERT INTO ##some_table
VALUES (@Description, @Lastnam, @Firstnam, Convert (varchar, @Number_Entered), Convert(varchar, @Number_Closed),
Convert(varchar, @First_Level_Temp), Convert(varchar, @Number_Lt24), Convert(varchar, @Number_Gt24))