>>>What's wrong with one SP. You always can use structure like this:
>>>
>>>IF @Something1
>>> BEGIN
>>>
>>> END
>>>ELSE IF @Something2
>>> BEGIN
>>>
>>> END
>>>ELSE IF @Something3
>>> BEGIN
>>>
>>> END
>>>
>>
>>SQL Server Help doesn't list the syntax you suggested.
>
>formal syntax is really more like..
>
>IF
>BEGIN
>...
>END
>ELSE
>IF
>BEGIN
>...
>END
>
>but I think SQL doesn't mind shortening to ELSE IF..
Yes, it lets me create it this way.
If it's not broken, fix it until it is.
My Blog