all groups > sql server dts > may 2005 >
You're in the

sql server dts

group:

DTSTaskExecResult_Success


DTSTaskExecResult_Success Kalyan
5/19/2005 2:54:03 PM
sql server dts:
i am executing

Following

DECLARE @res int
EXEC @res=Exec Admin_Fixes_Process_Duplicates_Referrals
SELECT @res

in Execute SQL Task

My question, If @res value is not equal to 0 i have to make
task failure else goto next task

can any one give idea how to solve my problem,


RE: DTSTaskExecResult_Success Rodney Mullins
5/19/2005 4:09:01 PM
Kalyan,


SELECT @res into a column alias.. For example

SELECT @res as ResultCode

Next, click on the parameter button. Click on the Output Parameter tab
followed by the Row Value and you should see ResultCode. From there you can
assign the ResultCode to a Global Variable. Next using ActiveX Script , you
can read in the global variable and set the Workflow Success or Failure flag
based on the value in the REsultCode.
[quoted text, click to view]
Re: DTSTaskExecResult_Success Darren Green
5/20/2005 12:21:03 AM
Or maybe fail the task with raiserror?

if @res <> 0
raiserror(blah blah)


In message <1803284C-D1C8-40C9-90A1-38AF5BEA0973@microsoft.com>, Rodney
Mullins <Rodney@Mullins.?.microsoft.com.invalid> writes
[quoted text, click to view]

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

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org
AddThis Social Bookmark Button