Thank you - I've now added entity_quoting=False to the right place in the db=DAL statement and magically all the SQLTABLEs are now working!
There is one strange behaviour - any references to the SUM statement must have the word 'SUM' in uppercase but references to 'COUNT' must all be in lower case as in <td style="text-align:right">{{='{0:,}'.format(row['_extra']['SUM(dpspend.amount)'])}} </td> <td>{{=row['_extra']['count(dpspend.amount)']}} </td> or hdrs = {'dpspend.dpentity':T('Entity'), 'SUM(dpspend.amount)':T('Overall amount'), 'count(dpspend.amount)':T('Records')} On Thursday, 9 November 2017 00:38:57 UTC, Leonel Câmara wrote: > > The entity_quoting should be in your db.py where you have db = DAL(..., > entity_quoting=False) > > Anyway, I'll take a look at your test app since the > "SUM('dpspend'.'amount')" should have worked. > -- 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.