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 |
|
khufiamalik
Posting Yak Master
120 Posts |
Posted - 2008-10-15 : 05:29:52
|
| Hello all,I have a condition in my SP and I want to stop further processing when this condition is meet during the SP execution.Can any one explain that how can i Stop further processing????Currently I have been using Return But it gives me error while running the SP.A severe error occurred on the current command. The results, if any, should be discarded.Thanks in advance |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-15 : 05:32:08
|
| can you post the code where you've used return? when do you want to stop execution of sp? |
 |
|
|
khufiamalik
Posting Yak Master
120 Posts |
Posted - 2008-10-15 : 05:33:38
|
| if @lMarginal_Slab_ID=0 begin Set @opMessage_Code='MSG_E11'; Set @opTotal_Annual_Tax=0; Return ; end |
 |
|
|
PeterNeo
Constraint Violating Yak Guru
357 Posts |
Posted - 2008-10-15 : 05:43:40
|
| are there any linked servers used in the sp? |
 |
|
|
khufiamalik
Posting Yak Master
120 Posts |
Posted - 2008-10-15 : 05:46:33
|
| no , this is being run on just one serveris there any other thing which can stop SP execution.But I also want to get the accurate output values from my SP (which i set during the execution of SP). |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-10-15 : 09:00:48
|
| http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=112585MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|