Tuesday, January 12, 2010

Get all vtigerCRM quotes

The following query gets vtigerCRM Quote List

SELECT t1.quote_no AS 'Quote No'
, t1.subject AS 'Subject'
, t1.quotestage AS 'Quote Stage'
, t4.potentialname AS 'Potential Name'
, t5.accountname AS 'Account Name'
, t1.total AS 'Total'
, t3.user_name AS 'Assigned To'
FROM vtiger_quotes t1
INNER JOIN vtiger_crmentity t2 ON t1.quoteid = t2.crmid AND t2.setype='Quotes'
INNER JOIN vtiger_users t3 ON t2.smownerid = t3.id
LEFT JOIN vtiger_potential t4 ON t1.potentialid = t4.potentialid
LEFT JOIN vtiger_account t5 ON t1.accountid = t5.accountid

No comments:

Post a Comment

Oracle Query