Il 28/04/14 21:06, Niphlod ha scritto:
> seems to me that you should use windowing functions instead....
>
> there's no need to introduce a new method.... you can use expression
> themselves in the select, and extract the field as usual
>
> myexpr = 'first_value(b_field) over (partition by a_field order by
> b_field)'
> rows = db2(db2.test_table.id > 0).select(myexpr, db2.test_table.a_field)
> for row in rows:
> print row.aa, row[myexpr]
uh! it sounds good :)
I'll surely try it
thanks a lot
Manuele
--
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/d/optout.