Greetings. I would like to select data from 3 tables, Customer, Periods, and Sales.
My Sales table has a Customer and a Period and a Sales Value, and I can select data as follows....
Select C.CustomerCode, C.CustomerTitle, S.Periodno, P.PeriodName, S.PeriodSales from ((Customers C Left Outer join CSales S on C.UniqueId =S.CustomerId) left outer join Periods P on S.Periodno=P.PeriodNumber)
But if a Customer only has sales in Period 1 and 3 I only get data for Periods 1 and 3
Is there any way that I can get data for periods 1 2 and 3 (with Period 2 showing 0 value)
Note: Also tried the following without sucess
Select C.CustomerCode, C.CustomerTitle, S.Periodno, P.PeriodName, S.PeriodSales from ((Periods P left outer join CSales S on P.PeriodNumber = S.Periodno) left outer join Customers C on S.CustomerId=C.UniqueId)