Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Good practice to separate If Endif
Message
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Stored procedures, Triggers, UDFs
Title:
Good practice to separate If Endif
Miscellaneous
Thread ID:
01681311
Message ID:
01681311
Views:
32
Hi,

I am troubleshooting a fairly large stored procedure. And I think the issue is that some IF - ENDIF do not separate various conditions. Even though I use BEGIN and END.
What is a good practice to separate various IF conditions in a stored procedure?

TIA

UPDATE. I also wanted to find out if there is a way to use ELSEIF in a stored procedure. I know you can do ELSE, but if I wanted to have multiple conditions, ELSEIF would be helpful. Or, is CASE - END the only way to have multiple conditions.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform