I am trying to create a left join query and must be something stupidly wrong as it doesn't work
Any suggestions? Thanks for any help! db.define_table('procedures', Field('id',writable=False, readable=False, label='ID'), Field('procedurenumber', unique=True, label='Procedure Number'), Field('procedurename', unique=True, label='Procedure Name'), Field('proceduredesc', label='Procedure Description'), Field('procdomain',label='ITGC Domain')) db.define_table('requestlist', Field('id',writable=False, readable=False, label='ID'), Field('requestdesc', label='Request'), Field('phaseid', 'reference phase', format = '%(pname)s', label='Phase'), Field('proceduresid', 'reference procedures', format = '%(procedurename)s', label='Procedure Name'), Field('reqrequestdate', 'date', label='Request Date', widget=SQLFORM.widgets.date.widget), Field('reqduedate', 'date', label='Due Date'), Field('reqdaysoutstanding', label='Days Outstanding', writable=False), Field('reqdateexpected', 'datetime', label='Date Expected'), Field('reqdatedelivered', 'datetime', label='Date Delivered'), Field('reqstatus', label='Status'), Field('assignedto', 'reference poc', format='%(pocname)s', label='Assigned To'), Field('reqevidenceloc', label='Evidence Location'), Field('reqrequestorid', 'reference poc', format='%(pocname)s', label='Requestor')) def pbc(): records = db().select(db.requestlist.ALL, db.procedures.ALL, left=db.procedures.on(db.procedures.id == db.requestlist.proceduresid)) return dict(records=records) -- 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.