What behavior were you trying to achieve?

Putting a conditional statement (test1 > 100) in a GROUP BY clause isn't
valid SQL.



Simon B.


On Tue, 2004-02-10 at 17:54, Andox wrote:

> Hello everybody.
> 
> I have a question about the SELECT command with UNION ALL.
> 
> When executing the following command in sqlite.exe (win32, console) i get the
> error message:
> "SQL error: ORDER BY term number 1 does not match any result column"
> 
> Command:
> SELECT test1 FROM table1 UNION ALL SELECT test1 FROM table2 GROUP BY test1 > 100;
> 
> So what i want to do, is to use ORDER BY for the total UNION result.
> Is this some a typo by me or is there something "wrong" with sqlite?
> 
> PS. I am a SQL newbie and sorry for my poor English :)

Reply via email to