Link to home
Start Free TrialLog in
Avatar of Star79
Star79Flag for United States of America

asked on

Proc help-If- loop

I have the below in a doesnt compile saying
Incorrect syntax near '}'.Not sure where is the error.

if(@pastchoice = 1)
set @mstart = GETDATE()-1
set @mend = GETDATE()-1
else if(@pastchoice = 2)
set @mstart = GETDATE()-7
set @mend = GETDATE()-7
else if(@pastchoice = 3)
 set @mstart = GETDATE()-31
set @mend = GETDATE()-31

Open in new window

Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the grade.  Good luck with your project.  -Jim