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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-02-08 : 09:55:54
|
| Wexy writes "I want to create a job with two steps, the first needs to run a Stored Procedure, and the second is to be run if the first step is successful, but not run if it fails.My problem is that I cannot seem to set a "failure", from the Stored Procedure, that is recognized by the Job Manager.I have tried setting return codes and the RAISERROR function.Any ideas ?" |
|
|
Lou
Yak Posting Veteran
59 Posts |
Posted - 2002-02-08 : 16:01:48
|
| Try this. HTH.Within the first Sp called "myFirstSp":select @myError=@@errorreturn @myErrorExecute the Sp:exec @myError= myFirstSpif @myError=0 exec mySecondSpEdited by - Lou on 02/08/2002 16:02:54 |
 |
|
|
|
|
|