General SQL parse error. The message will probably tell you what you’re doing wrong (assuming that you’re using the right SQL variant), so: read that?
If that fails, try executing your query (either simply by running your application, or in your DB-specific tool such as SQL Server Management Studio), and see what happens.