Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
PutJatDa
Starting Member
12 Posts |
Posted - 2006-06-02 : 09:58:16
|
| In a DTS package, I have various SQL tasks which are linked by workflows, either 'on success' or 'on failure'.What is the sql statement for making a sql task fail so that it follows the 'on failure' workflow?Thanks |
|
|
psawant
Starting Member
14 Posts |
Posted - 2006-06-02 : 10:32:04
|
| Write the vbscript in dts with returning following value "DTSTaskExecResult_Failure" from a function. |
 |
|
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2006-06-02 : 10:50:50
|
| I believe you could also call raiserror and it would follow that path.Mike"oh, that monkey is going to pay" |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-06-02 : 11:13:19
|
If you do a raiserror with severity 11 or above, it will follow the 'on failure' flow.raiserror('Error occured in My SQL Taxk',16,1) CODO ERGO SUM |
 |
|
|
PutJatDa
Starting Member
12 Posts |
Posted - 2006-06-02 : 11:32:58
|
| Thanks to all your replies.With the raise error, that's the sort of thing I'm after but I want to do it without displaying the error message. |
 |
|
|
|
|
|