Saturday, January 9, 2010

Get all vtigerCRM campaigns

This query gets all vtigerCRM Campaigns

SELECT t1.campaign_no AS 'Campaign No'
, t1.campaignname AS 'Campaign Name'
, t1.campaigntype AS 'Campaign Type'
, t1.campaignstatus AS 'Campaign Status'
, t1.expectedrevenue AS 'Expected Revenue'
, t1.closingdate AS 'Expected Closde Date'
, t3.user_name AS 'Assigned To'
FROM vtiger_campaign t1
INNER JOIN vtiger_crmentity t2 ON t1.campaignid = t2.crmid AND t2.setype = 'Campaigns'
INNER JOIN vtiger_users t3 ON t2.smownerid = t3.id

No comments:

Post a Comment