dbTalk Databases Forums  

Stored procedure in DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Stored procedure in DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dipa
 
Posts: n/a

Default Stored procedure in DTS - 07-05-2006 , 06:25 AM






I have created a Stored procedure which is executing right in query
analyser but if i put the same stored procedure in the DTS to execute
,Data transformation task it is giving me error as
"ADO ERROR : Invalid Object Name #tempEmp "


In this stored procedure I have created Temporary table #tempEmp.
stored procedure is as follows ;

CREATE PROCEDURE EmpIDName
AS
begin transaction
create table #tempEmp (EmpId int, EmpName varchar(20))
insert into #tempEmp
SELECT EmpId , EmpName from Employee
select * from #tempemp
commit transaction

Please help me.
Thank you.


Reply With Quote
  #2  
Old   
Praveen
 
Posts: n/a

Default Re: Stored procedure in DTS - 07-05-2006 , 07:52 AM






you can not use temp table in Data transformation tas. What you can to
is create the permant temp table and dump the data, do all your
manipulation.

Once the Process is over you can drop the permant temp table inside the
DTS package itself.


Dipa wrote:
Quote:
I have created a Stored procedure which is executing right in query
analyser but if i put the same stored procedure in the DTS to execute
,Data transformation task it is giving me error as
"ADO ERROR : Invalid Object Name #tempEmp "


In this stored procedure I have created Temporary table #tempEmp.
stored procedure is as follows ;

CREATE PROCEDURE EmpIDName
AS
begin transaction
create table #tempEmp (EmpId int, EmpName varchar(20))
insert into #tempEmp
SELECT EmpId , EmpName from Employee
select * from #tempemp
commit transaction

Please help me.
Thank you.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.