473,412 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

dts : call 2 procs within one 'execute sql task'

Hi :

Can i call 2 procs within one task?
I have sp_proc1 ? (and have declared one global variable as input
parameter)
now i have another sp_proc2 which uses same input parameter

but if i write two statements like this within one task, i get an
error

exec sp_proc1 ?
exec sp_proc2 ?

I can solve the problem by writing them in 2 separate tasks, but would
like one task.

Please help..

thanks
Rashika
Jul 20 '05 #1
1 1683
rashika (rs*********@ibs.com) writes:
Can i call 2 procs within one task?
I have sp_proc1 ? (and have declared one global variable as input
parameter)
now i have another sp_proc2 which uses same input parameter

but if i write two statements like this within one task, i get an
error
Standard question: what error is that? Even if the error appears to
be gibberish to you, it may not do to anyone else. (But since I don't
know DTS, it might be gibberish to me too. :-)
exec sp_proc1 ?
exec sp_proc2 ?

I can solve the problem by writing them in 2 separate tasks, but would
like one task.


You could always write a wrapping procedure:

CREATE MyWrapper @s <datatype> AS
EXEC sp_proc1 @s
EXEC sp_proc2 @s

Note: the prefix sp_ is reserved for system stored procedure, and SQL Server
first looks for these in the master database. Do not use sp_ for your own
prodedure.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Jagannathan Santhanam | last post by:
Hello I am trying to execute ‘xp_cmdshell' from within a DTS package that was created by another person. When I try to execute that ‘SQL Task' selectively from within the package, I get the...
4
by: Jean-Marc Blaise | last post by:
Dear all, I have simulated the windows MULTI application with a java program calling the SQLTP1DL proc referenced as DB2DARI application, on Linux Intel or ZLinux. If the proc is NOT FENCED,...
0
by: Dave Sisk | last post by:
I've created a system or external trigger on an AS/400 file a.k.a DB2 table. (Note this is an external trigger defined with the ADDPFTRG CL command, not a SQL trigger defined with the CREATE...
1
by: Paul R | last post by:
Hi, I have a Winforms application that access some SQLServer2000 stored procedures. I have now written some new Webforms pages to use some of the same stored procs. The Webforms use the SAME...
15
by: Burt | last post by:
I'm a stored proc guy, but a lot of people at my company use inline sql in their apps, sometimes putting the sql in a text file, sometimes hardcoding it. They don't see much benefit from procs, and...
9
by: Ronald S. Cook | last post by:
What do you guys think of abandoning stored procedures and writhing the SQL in code? I'm a little new to the debate and not sure I totally understand. From my command object, I can just select...
3
by: | last post by:
I am enjoying making generalized methods to serve common needs, such as: ImageProcessing.MakeQuickResize(); ImageProcessing.Sharpen(); FileOps.CreateYearAndMonthAndDayDirectoryBasedOnDate()...
1
by: leofdz | last post by:
I tried calling an AS400 stored procedure in SSIS using an execute sql task. The task started executing but never completes and I am not getting any error messsage. There is no problem with AS400...
1
by: mikegolden | last post by:
An application I'm working on makes extensive use of output parameters and return values, thus forcing me to use the ADODB Command object to execute the stored procs. For recordset returning stored...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.