If you make a mistake/typo in a SOQL query in the Developer Console, you frequently get the - not helpful - message "Unknown error parsing query".

I started programming in the early 80s, in BASIC of course, and all we had back then was: "Syntax error at line NN". So here we are in 2015 and Salesforce gives us its equivalent of Syntax error. I have studied Computer Science and I graduated in Compiler building, so I know a thing or two about parsers and about what is possible regarding error messages on incorrect syntax.

Anyone here with some inside knowledge who can explain why we do not get more helpful error messages?

3 Answers 3


I would suggest using Force.com IDE plugin for Eclipse, which gives you more detailed error message about syntax error. Also you can try use other third-party applications which allow you to perform SOQL like workbench or Schema Viewer.

I would agree that error from Developer Console is not the error which we would like to see, probably you can either log a case to Salesforce or suggest your idea to Idea Exchange about this.


Unfortunately, as you've noticed, the SOQL parser is a bit rudimentary. Especially when doing direct SOQL calls. You'll get much clearer errors if you use the "Execute Anonymous" item in the Dev Console and run the SOQL in Apex. For some reason, the compiled SOQL errors are much nicer than the dynamic SOQL errors.


You can also use the Force.com Explorer to execute the query. I would suggest consulting the SOQL reference guide, especially for the Date related functions. SOQL is similar to SQL, but there are a lot of differences between them.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .