:Incorrect syntax near the keyword 'then'.