What should be used to exit out of the procedure in a IF statement (1 Viewer)

Hapr1

Registered User.
Local time
Yesterday, 19:07
Joined
Aug 4, 2005
Messages
24
Hi,
I have an IF statement
Where I compare three variables
If [@calendar_ID1]<>[@calendar_ID2] OR [@calendar_ID1]<>[@calendar_ID3] ELSE

Else,I want to exit out of the Stored procedure..
What should I use.
GOTO END is not working..
Can't use EXIT

Thanks...
 

rainman89

I cant find the any key..
Local time
Yesterday, 22:07
Joined
Feb 12, 2007
Messages
3,016
how about

exit sub

or

end if
 

tehNellie

Registered User.
Local time
Today, 03:07
Joined
Apr 3, 2007
Messages
751
If you want to quit the SP, try using RETURN. You can optionally return a code to your calling code as well using RETURN <integer>
 

Users who are viewing this thread

Top Bottom