-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
InCommon exec and billing contacts from sf query
- Loading branch information
nckroy
committed
Mar 14, 2018
1 parent
7c0ece2
commit e85d0a9
Showing
1 changed file
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| 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 | ||
| 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 LIKE '%Billing%') AS BI | ||
| ON EX.E_ACCT_NAME = BI.B_ACCT_NAME | ||
| ORDER BY E_ACCT_NAME |