On Jul 29, 3:14 pm, phneoix <[email protected]> wrote: > i hope iam not confusing you guys.
No, this is very clear & makes sense. My first thought would be to merge all the lookup tables into 1 & add a 'type' column, but I guess you can't do that? Temporary tables aren't always recommended: http://www.sql-server-performance.com/articles/per/derived_temp_tables_p1.aspx How about doing something like using a dictionary to store the temporary table in: mystorage = {} lookup_tables = [endmills, gauging, etc] for lookup_table in lookup_tables: rows = db(db[lookup_table].id>0).select() for row in rows: mystorage[row.product_id] = row.product_name Then instead of doing the Join with the material issue table, just do a lookup in the dict... F --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

