I can't use .with_alias()... I use the SQL string feature that works for another query... I mean it has return an entry in Row dict base on the "AS field_name" of the SQL string. In the case above, I guess that the parser failed on the 2 "AS" in the SQL sring...
I have not been able to find in dal.py which piece of the code is reponsible for the parsing of the SQL string feature, if someone can give me a pointer. It would help. Richard On Wed, May 14, 2014 at 1:10 PM, Richard Vézina <ml.richard.vez...@gmail.com > wrote: > So I can do this : > > db().select(db.other_table.other_field, > "string_agg(CAST(COALESCE(table1.sign_id, NULL) AS text), ', ') AS > sing_id", ...) > > The only thing still not working is .with_alias('alias_name') not working > in this context... > > SQL "sql_string AS alias_name" not seems to work > > Richard > > > On Wed, May 14, 2014 at 10:46 AM, Richard <ml.richard.vez...@gmail.com>wrote: > >> Hello, >> >> Is there a way to do string_agg() with in web2py for a query that have >> groupby clause? >> >> Richard >> >> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to the Google Groups >> "web2py-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. >> > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.