fixed syntax error in sql script