Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'IF'. I am running SQL SSMS
osTicket is written for MySQL. While you may be able to modify the source to get it to run with MSSQL, we do not support it.