please print the output of db(db.headers.id == db.alarms.header)._select(db.header.name, db.alarms.komment, limitby=(0,5))
-Thadeus On Fri, Feb 26, 2010 at 12:00 PM, SergeyPo <ser...@zarealye.com> wrote: > Limitby clause still is not working with Oracle backend when used in > queries that have any kind of join, left or inner. > > db.define_table('headers', > SQLField('name', 'string') > ) > > db.define_table('alarms', > SQLField('header', db.headers), > SQLField('komment', 'string') > ) > > data = db(db.headers.id == db.alarms.header).select( > db.header.name, db.alarms.komment, limitby=(0, 5) > ) > > ...gives Oracle error "wrong identifier 'alarms'.'headers' > > But in fact this is not matter of wrong fields, problem is with > limitby construction. > > Queries using left join also give error, but another one. In both > cases error message is quite irrelevant to real problem. E.g. I need a > pretty complex query with groupby, count and left join... Error > message in this case will be 'this is not valid groupby clause'. > Obviously, problem is in aliases that are used for nested queries > required by Oracle to limit rows in result set. > > Any help with DAL or workarounds please! I am ready to help with > testing. > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.