Currently I have the following query:SELECT TOP (100) PERCENT dbo.tblAccounts.AccountNumber, dbo.tblAccounts.AccountName, dbo.tblAccounts.Address1, dbo.tblAccounts.Address2, dbo.tblAccounts.City, dbo.tblAccounts.State, dbo.tblAccounts.PostalCode, dbo.tblAccounts.Country, dbo.tblReps.RepName, dbo.tblAccounts.AccountID, dbo.tblAccounts.AccountType, dbo.tblAccounts.InitialContact, dbo.tblAccounts.IsVendor, dbo.tblAccounts.IsSubcontractor, dbo.tblAccounts.PrimaryPhoneNumber, dbo.tblAccounts.PrimaryFaxNumber, dbo.tblAccounts.PrimaryContactNumber, dbo.tblAccounts.ARCustomerNumber, dbo.tblAltBillTo.Name, dbo.tblAltBillTo.Address1 AS Expr1, dbo.tblAltBillTo.Address2 AS Expr2, dbo.tblAltBillTo.City AS Expr3, dbo.tblAltBillTo.State AS Expr4, dbo.tblAltBillTo.PostalCode AS Expr5, dbo.tblAltBillTo.ARCustomerNumber AS Expr7, dbo.tblAccounts.SalesTaxCode, dbo.tblAccounts.TaxExemptID, dbo.tblAccounts.TaxExemptCategory, COALESCE (A.DateOpened, 0) AS Expr6FROM dbo.tblAccounts INNER JOIN dbo.tblAltBillTo ON dbo.tblAccounts.AccountNumber = dbo.tblAltBillTo.AccountNumber INNER JOIN dbo.tblReps ON dbo.tblAccounts.RepNumber = dbo.tblReps.RepNumber LEFT OUTER JOIN (SELECT MAX(DateOpened) AS DateOpened, AccountNumber FROM dbo.tblServiceOrders GROUP BY AccountNumber) AS A ON dbo.tblAccounts.AccountNumber = A.AccountNumberORDER BY dbo.tblAccounts.AccountNumber
The current query returns all accounts that are:in tblAccounts AND tblAltBillTo AND tblReps (along with all of the max service order dates that go with these records).Right?What I want is:ALL max service order dates with ALL Accounts (where AccountNumbers match) along with any matching info from BillTo and Reps tables.ALL max service order dates OUTER JOIN with ALL Accounts LEFT OUTER JOIN BillTo (or nothing) and...?Could someone help me out with this?