I just want to verify that I'm not missing something here... so bear with me.
I'm rewriting a lot of old stored procedures and keep seeing IF statements formatted similar to this:
begin
if @someParameter <> 'ThisType'
set @someCode = right(cast(@pYear as varchar(6)),2) + 'THIS'
end
So the Begin...End block just wraps (but does not effect) the IF statement, right? Is this some older syntax for IF or something?
The guy who wrote this didn't have a lot of SQL experience prior to this job; he worked mostly in VB (pre-.NET). Maybe this is syntax from some other language, so he accidentally wrote it this way (by habit)?
This is SQL Server 2005 (code was written on/for SQL Server 2000), btw
Like I said, I'm just trying to wrap my brain around this spaghetti. Any thoughts/comments/illuminating insights are welcome
Thanks