Error handling with SQL Server
Hi
I have created a stored procedure where 3 conditions are applied, like
if Condition 1 is true
select blah blah......
if Condition 2 is true
select blah blah......
if Condition 3 is true
select blah blah......
Now to handle the error, I have written with each condition that
if (@@error <> 0)
--do some work
What I want to know is, that rather than repeating the error condition in all the conditions, can't I write it universally anywhere so that if error comes in any of the conditions, some error handling is done.
Regards
Mike
Fortune favours the brave, so don't regret on missed oppurtunities.
__________________
Regards
Mike
|