Consider the following query rows = db(db.table).select(x,y groupby = x)
If x and y are table fields this obviously works. Now consider group = x/100 rows = db(db.table).select(group,y, groupby = group) This also works nicely and will group into groups for each x with a value of x divided by 100, but is of little use. However, the following fails: group = math.floor(x/100) and throws the exception function doesn't have attribute type The intent is to group numeric values into ranges, so I am trying to implement a slightly more complex function which returns a range indicator, perhaps as a string (e.g. "100-200"), but in order to get that working first the simple case of using the result of a function needs to be solved. In plain SQL calling a function is an option, perhaps it is a limitation of the DAL thnx Arthur -- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

