queries:errors:syntax-errors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

queries:errors:syntax-errors [2016/01/04 20:48] (current)
Line 1: Line 1:
 +{{indexmenu_n>​1}}
 +====== Syntax Errors ======
 +<​summary>​
 +Syntax errors are mistakes in the syntax and should (or better not) occur when saving widgets or executing queries.
 +</​summary>​
  
 +===== Could not understand draw query because of an unexpected token '​...'​ instead of '​as' ​ =====
 +This is a very common problem, especially from people coming from the SQL world. In DQL, you MUST specify an alternative column name IF it can't be determined automatically. For instance:
 +<code dql>
 +draw number using 1 - 2
 +</​code>​
 +
 +This is not working, and must be changed like this:
 +<code dql>
 +draw number using 1 - 2 as value
 +</​code>​
 +
 +The same rules apply to derived tables and sub queries.
 +
 +===== Could not understand draw query because of an unexpected token '​using'​ instead of '​command type' =====
 +All draw queries must start with a "draw something"​ prefix. If this error occurs, it most likely means the draw prefix is missing. The query might look like this:
 +<code dql>
 +using 1 as value
 +</​code>​
 +
 +instead of this:
 +<code dql>
 +draw number
 +using 1 as value
 +</​code>​