--- Marco Bambini <[EMAIL PROTECTED]> wrote:
> Starting from version 3.4.2 I receive errors with queries like:
> 
> SELECT a.field FROM a UNION ALL SELECT b.field FROM b ORDER BY a.field
> or even
> SELECT a.field FROM a UNION ALL SELECT a.field FROM a ORDER BY a.field
> 
> error is:
> ORDER BY term number 1 does not match any result column
> 
> Tables are created by:
> CREATE TABLE a (field);
> CREATE TABLE b (field);
> 
> Please note that the above queries worked fine with sqlite 3.2.x or  
> 3.3.x.
> Any idea?

You probably know the workarounds:

  SELECT a.field FROM a UNION ALL SELECT b.field FROM b ORDER BY 1;

or

  SELECT a.field AS x FROM a UNION ALL SELECT b.field FROM b ORDER BY x;

but it's odd that this one doesn't work as well:

  create table t1(a);
  create table t2(b);

  select t1.a from t1 union all select t2.b from t2 order by a;

  SQL error: ORDER BY term number 1 does not match any result column




      
____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to