Hey guys, I have a quick question. Does the DAL support type casting on the fly? I am working with a legacy mssql 2008 database that I cannot alter. Within this database it has a field of integers but the field type is string. When I try to run the sum() function on that field I get <class 'gluon.contrib.pypyodbc.ProgrammingError'>((u'42000', u'[42000] [FreeTDS][SQL Server]Operand data type char is invalid for sum operator.'))
Short of having to loop over the fields and int() them so I can add them, I was wondering if there was anyway to do this within web2py/DAL framework? I tried to change the field type before running the sum() function hoping I could trick it but that still did not work. -- 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.