I am very familiar with programing in Perl and up until now been having my perl scripts do all the leg work. Well now I am moving a lot of the leg work over to stored procs, views, and general t-sql commands. In one of the procs I am making I have a single variable that can have 3 possible values so I was going to do an If else End if statement but can't quite figure out the t-sql equivalent to the END IF part of the statement. The code I have written so far is this:create proc UpdateStaffWebSites ( @UpdateType nchar(6), @SiteID smallint, @UID varchar(50), @SiteAddress varchar(50), @SiteName varchar(50), @OutPut ntext output) asif @UpdateType = 'New' insert into FFAdmin.dbo.StaffWebSites (UID, SiteAddress, SiteName) values ('@UID', '@SiteAddress', '@SiteName')end ifif @UpdateType = 'Remove' delete FFAdmin.dbo.StaffWebSites where SiteID = @SiteIDend ifif @UpdateType = 'Update' begin update FFAdmin.dbo.StaffWebSites set SiteAddress = @SiteAddress, SiteName = @SiteName where SiteID = @SiteID endend ifNow I understand that, in this case, I could do if else if else if else... statements but in a few other scripts that I am working over in my head it would make programing them easier in this format.So what is the t-sql version of the “end if”?-- If I get used to envying others...Those things about my self I pride will slowly fade away.-Stellvia