>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
>
That's exactly what I'm writing at the moment but I didn't know what it should be ELSE IF.
BTW, I think I don't need BEGIN/END if I only have just one select command, am I right?
And I have another SQL question regarding projection. For some reason the code my colleague tried didn't work for me with the strange error.
If it's not broken, fix it until it is.
My Blog