Sugar 4.5.0e / Apache 2.2.3 / PHP 5.1.6
Hi,
I have added an additional column from the Accounts table to the Opportunity ListView, the column i added was the account industry and I have copied the vardef definition for account_name.
The query executes without a problem, however I noticed that the accounts table was being joined twice. Does anyone have any ideas what maybe causing this and how I could fix it.
Many Thanks,
Chris.
Below is the query produced by Opportunity ListView
Code:SELECT opportunities.id , opportunities.name , jt0.name account_name, jtl0.account_id account_id , jt1.industry industry_name, jtl1.account_id account_id, opportunities.sales_stage , opportunities.amount_usdollar , opportunities.date_closed , jt2.user_name assigned_user_name , jt2.created_by assigned_user_name_owner , 'Users' assigned_user_name_mod, opportunities.assigned_user_id FROM opportunities LEFT JOIN accounts_opportunities jtl0 ON opportunities.id=jtl0.opportunity_id AND jtl0.deleted=0 LEFT JOIN accounts jt0 ON jt0.id=jtl0.account_id AND jt0.deleted=0 AND jt0.deleted=0 LEFT JOIN accounts_opportunities jtl1 ON opportunities.id=jtl1.opportunity_id AND jtl1.deleted=0 LEFT JOIN accounts jt1 ON jt1.id=jtl1.account_id AND jt1.deleted=0 AND jt1.deleted=0 LEFT JOIN users jt2 ON jt2.id= opportunities.assigned_user_id AND jt2.deleted=0 AND jt2.deleted=0 where opportunities.deleted=0 LIMIT 0,21


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks