Consider this SQLite session: sqlite> create table A (id integer primary key); sqlite> create table B (id integer primary key, name text); sqlite> select * from A as X order by (select name from B where B.id = A.id); Error: no such column: A.id sqlite> select * from A as X order by (select name from B where B.id = X.id); sqlite>
One would expect that table name and alias should work interchangeably except when the name is ambiguous (which is not the case here). Looks like a bug to me (though, admittedly, it's rather a corner case, and there's an easy workaround). -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users