Advertisement
Guest User

Untitled

a guest
Mar 17th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 1.54 KB | None | 0 0
  1. SELECT [tblEstimates].[EstimateID], [tblEstimates].[CompanyID], [tblEstimates].[CustomerID],
  2.     [tblEstimates].[ProjName], [tblEstimates].[PO#], IIf(IsNull([ContactPh]),[tblCustomers].[Phone],[ContactPh])
  3.     AS Phone, IIf(IsNull([ContactFx]),[tblCustomers].[Fax],[ContactFx]) AS Fax, [tblEstimates].[ExpectQty],
  4.     [tblEstimates].[EstDate], [tblEstimates].[ContactName] AS Attn, [tblEmployee]![FirstName] & " " &
  5.     [tblEmployee]![LastName] AS SRName, [tblEstimates].[PermitNum], [tblEstimates].[Terms],
  6.     [tblEstimates].[DataIn], [tblEstimates].[DueIn], [tblEstimates].[Post$Due], [tblEstimates].[DropDate],
  7.     [tblEmployee].[email], [tblEstimates].[OrderComments], [tblCustomers].[CustCode],
  8.     [tblCustomers].[Company], [tblCustomers].[Taxable], [tblCustomers].[address1] & " " &
  9.     [tblCustomers].[address2] AS Address1, [tblCustomers].[City], [tblCustomers].[State], [tblCustomers].[Zip],
  10.     [tblAdmin].[CompanyName], [tblAdmin].[CompanyAddress], [CompanyCity] & "  " & [CompanyState] & ". " &
  11.     [CompanyZip] AS CSZ, [tblAdmin].[CompanyPhone], [tblAdmin].[CompanyFax], [tblAdmin].[CompanyLogo],
  12.     [tblAdmin].[TaxRate], [tblAdmin].[CompanyCity], [tblAdmin].[CompanyState], [tblAdmin].[CompanyZip]
  13.     FROM (((tblCustomers RIGHT JOIN tblEstimates ON
  14.     [tblCustomers].[CustomerID]=[tblEstimates].[CustomerID]) LEFT JOIN tblAdmin ON
  15.     [tblEstimates].[CompanyID]=[tblAdmin].[CompanyID]) LEFT JOIN tblEmployee ON
  16.     [tblEstimates].[SalesRep]=[tblEmployee].[EmployeeID]) LEFT JOIN qryContactPhFxEst ON
  17.     [tblEstimates].[ContactName]=[qryContactPhFxEst].[ContactName];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement