SQL must be simple SELECT

Avatar
  • updated
  • Completed

I have an sql with a UNION, and I get the message "SQL must be simple SELECT".

It's a new problem, my sql was doing well up to now

Avatar
Anonymous

Hello, Poul.

We've changed the confusing behavior with the "SQL must be simple SELECT" error message. I hope that the new version 3.3.2.0 of FlySpeed SQL Query will be understandable easier than before.

Avatar
Anonymous

Hi again,


This error has happened because you've switched to the "Edit single SELECT query":

This mode allows you to edit each sub-query in a list of sub-queries united with set operators (UNION, EXCEPT, INTERSECT, MINUS) separately. So, in the Text tab under the visual query builder control, you'll see single select statement only.

This means that when you have a query like this:


Select * From ABC

UNION All
Select * From BCD


You'll see only the first or the second sub-query on the Text tab:



You are not only browsing, but you can edit this sub-query and changes will be applied to the whole query.

But this means that you can not type a sub-query containing other union sub-queries in this mode. I know that this is inconvenient, that's why we've choosen the "Edit sub-query with unions" mode as default.

So you can either switch to default mode and type a query with unions then, or you can go to the SQL Text tab:




There you will see the whole query regardless of the mode on the Query Builder tab.


I understand that this error message is confusing, so we are going to change this in one if the next builds.

Avatar
Anonymous

Hello, Poul.

Sorry for this problem. Can you please let me know what is your database server and send me a screenshot of the Connection Properties dialog?