I am creating a store procedure but while executing the procedure i am getting the particular error.
Msg 217, Level 16, State 1, Procedure SendMail_Renewapp,
Remove the BEGIN and END for your IF statement
BEGIN
END
IF
example
WHILE @@FETCH_STATUS = 0 BEGIN IF @variable --NO BEGIN --Do this --NO END END