You should use Query only when using SELECT commands. In this case you can use Execute SQL String.
Query
Execute SQL String
Here is a screen capture of RIDE and the documentation of those keywords.