Skip to content

Commit

Permalink
More specific roles
Browse files Browse the repository at this point in the history
  • Loading branch information
nckroy committed Mar 15, 2018
1 parent 546b37f commit f707255
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions incommon-exec-billing-contacts_sf.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ This work is licensed under a https://creativecommons.org/licenses/by/4.0/ Creat

SELECT * FROM (SELECT A.NAME AS E_ACCT_NAME, C.FIRST_NAME__C AS EXEC_FNAME, C.LAST_NAME__C AS EXEC_LNAME, C.CONTACT_EMAIL__C AS EXEC_MAIL
FROM SF_CONTACT_AFFILIATION__C C JOIN SF_ACCOUNT A ON C.ACCOUNT__C = A.ID
WHERE C.SERVICE__C LIKE '%InCommon%' AND C.STATUS__C = 'Current' AND C.ROLE__C LIKE '%Exec%') AS EX
WHERE C.SERVICE__C LIKE '%InCommon%' AND C.STATUS__C = 'Current' AND C.ROLE__C = 'Executive Contact') AS EX
LEFT JOIN
(SELECT A.NAME AS B_ACCT_NAME, C.FIRST_NAME__C AS BLG_FNAME, C.LAST_NAME__C AS BLG_LNAME, C.CONTACT_EMAIL__C AS BLG_MAIL
FROM SF_CONTACT_AFFILIATION__C C JOIN SF_ACCOUNT A ON C.ACCOUNT__C = A.ID
WHERE C.SERVICE__C LIKE '%InCommon%' AND C.STATUS__C = 'Current' AND C.ROLE__C = 'Billing') AS BI
WHERE C.SERVICE__C LIKE '%InCommon%' AND C.STATUS__C = 'Current' AND C.ROLE__C = 'Billing Contact') AS BI
ON EX.E_ACCT_NAME = BI.B_ACCT_NAME
ORDER BY E_ACCT_NAME

0 comments on commit f707255

Please sign in to comment.