GNOME Bugzilla – Bug 761529
Inner query alias without the `AS`dont work
Last modified: 2016-02-06 15:12:26 UTC
The query: SELECT foo.abc FROM (select abc from bar) foo; When parsing the query, gda_sql_parser_parse_string, mark the top node as UNKNOWN instead of a Select. That is a valid query on sqlite3 and mysql, see: sqlite> create table bar(abc varchar(10)); sqlite> insert into bar values('hi'); sqlite> SELECT foo.abc FROM (select abc from bar) foo; hi Seems like that syntax was not handled by the parser.y lemon file. So I have a patch for it: https://github.com/arthurnn/libgda/commit/0ba0e8f49f90304256e4fca637928d8cad55a1e0 I also sent the patch through the mailing list, but let me know if you need more info. Thanks
Created attachment 320401 [details] [review] Support for inner queries alias without the `AS`
Patch committed, see https://git.gnome.org/browse/libgda/commit/?id=91e87da6d30bf09a05fd0f6809bdbf2bff6dbe4a Thanks!