If statement using logical operator????

Hapr1

Registered User.
Local time
Today, 00:27
Joined
Aug 4, 2005
Messages
24
Hello,
I am having problem in setting up an if statement
where I have 3 calendar_id -@calendar_ID1,@calendar_Id2,@calendar_ID3.
I need to check and see
if (@calendar_ID1<>@calendar_ID2) OR if(@calendar_ID1<>@calendar_ID3)
then
I need to exit out of the stored procedure.

How can I implement this check constraint.

I am getting error when I use an IF statement with OR ,AND operator.
Is that possible or not
?
Thannks
 
If [@calendar_ID1]<>[@calendar_ID2] OR [@calendar_ID1]<>[@calendar_ID3] Then


Brian
 
Hi Brian ,

How do I specify the 'else condition wherein exit out of stored procedure..
Thanks
I can't use exit proc or end..
any ideas?
 
OOPS! I have only just noticed that this is SQL server not ACCESS, I am sorry about that I know nothing about SQL Server and stored procedures, I presume that you cannot just say
Exit Procedure (or something similar)

Sorry to have wasted your time.
I would suggest a repost as some helpers look for posts with zero response.

Brian
 
Look at RETURN in BOL.
 

Users who are viewing this thread

Back
Top Bottom