davidbitton

Untitled

Dec 22nd, 2011
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.97 KB | None | 0 0
  1. SELECT
  2.                AR_Customer_Contact.Customer_Contact_Id, AR_Customer_Contact.E_Mail, AR_Customer_1.Customer_Number,
  3.                AR_Customer.Customer_Number AS Expr1
  4. FROM  AR_Customer_Contact LEFT OUTER JOIN
  5.                AR_Site_Contact INNER JOIN
  6.                AR_Customer_Site ON AR_Site_Contact.Site_Id = AR_Customer_Site.Customer_Site_Id INNER JOIN
  7.                AR_Customer AS AR_Customer_1 ON AR_Customer_Site.Customer_Id = AR_Customer_1.Customer_Id ON
  8.                AR_Customer_Contact.Customer_Contact_Id = AR_Site_Contact.Site_Contact_Id LEFT OUTER JOIN
  9.                AR_Customer_Bill INNER JOIN
  10.                AR_Customer ON AR_Customer_Bill.Customer_Id = AR_Customer.Customer_Id INNER JOIN
  11.                AR_Bill_Contact ON AR_Customer_Bill.Customer_Bill_Id = AR_Bill_Contact.Bill_Id ON
  12.                AR_Customer_Contact.Customer_Contact_Id = AR_Bill_Contact.Contact_Id
  13. WHERE (AR_Customer_Contact.E_Mail <> '') AND (AR_Customer_1.Customer_Number IS NULL)
Advertisement
Add Comment
Please, Sign In to add comment