dbTalk Databases Forums  

Output Variable assignment to Global Variable in DTS

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


Discuss Output Variable assignment to Global Variable in DTS in the microsoft.public.sqlserver.dts forum.



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

Default Output Variable assignment to Global Variable in DTS - 07-01-2003 , 04:55 PM






Hi Folks :
I have an excute SQL Task in DTS Package. I am excuting a
sproc which has three output parameters . I would like to
assign the values to the Global Variables in the Package
so that I can use the Global variables in another Task .
But when I parse the code and click for the Parameter
button in the Excute SQL Task I get the message that the
Query does not have parameter . What I am doing wrong .
How can I resolve the Issue.

Here is the Code in the Execute SQL Task.
set nocount on
declare @BatchName varchar(20),
@JobNo INTEGER ,
@Rundate DATETIME

exec Empower.U_EppNonEppProcess
@BatchName output,
@JobNo output,
@Rundate output

select @BatchName as BatchName, @JobNo as JobNo,
@Rundate as Rundate

Thanks

Dhanraj

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Output Variable assignment to Global Variable in DTS - 07-02-2003 , 02:01 AM






Here's an article that should get you started

Global Variables and Stored Procedure Parameters
http://www.sqldts.com/default.aspx?6,102,234,0,1

--


Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org

"Dhanraj Mahendra" <dmahendra (AT) ryland (DOT) com> wrote

Quote:
Hi Folks :
I have an excute SQL Task in DTS Package. I am excuting a
sproc which has three output parameters . I would like to
assign the values to the Global Variables in the Package
so that I can use the Global variables in another Task .
But when I parse the code and click for the Parameter
button in the Excute SQL Task I get the message that the
Query does not have parameter . What I am doing wrong .
How can I resolve the Issue.

Here is the Code in the Execute SQL Task.
set nocount on
declare @BatchName varchar(20),
@JobNo INTEGER ,
@Rundate DATETIME

exec Empower.U_EppNonEppProcess
@BatchName output,
@JobNo output,
@Rundate output

select @BatchName as BatchName, @JobNo as JobNo,
@Rundate as Rundate

Thanks

Dhanraj



Reply With Quote
  #3  
Old   
Dhanraj Mahendra
 
Posts: n/a

Default Re: Output Variable assignment to Global Variable in DTS - 07-02-2003 , 11:15 AM



Hi Allan :
Based on the Global Variables and Stored Procedure Parameters
http://www.sqldts.com/default.aspx?6,102,234,0,1 article I wrote my
code. I still could get it to work. If you can tell what I am missing
will be help full. The site was very helpfull

Thanks

Dhanraj



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Output Variable assignment to Global Variable in DTS - 07-02-2003 , 11:29 AM



In article <OxwaaULQDHA.3664 (AT) tk2msftngp13 (DOT) phx.gbl>, Dhanraj Mahendra
<anonymous (AT) devdex (DOT) com> writes
Quote:
Hi Allan :
Based on the Global Variables and Stored Procedure Parameters
http://www.sqldts.com/default.aspx?6,102,234,0,1 article I wrote my
code. I still could get it to work. If you can tell what I am missing
will be help full. The site was very helpfull

Thanks

Dhanraj

What does your code look like now?
Make sure that the only result set produced by all code and procedures
used is the final select for the output parameters.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com




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.