I have 2 questions on the following:tblProjectInformationProject | Name | City10001 | My House | MyTowntblLoadInformationDate | Project | Load10/31/03| 10001 | 110/31/03| 10001 | 210/31/03| 10001 | 3tblComponentScheduleProject | ShipDate | Load | Component 10001 | 10/31/03 | 1 | 401 10001 | 10/31/03 | 1 | 401tblComponentsProject | Component | Weight 10001 | 401 | 1000*******************************Output Required*******************************Date |Project | Load | TotalWeight 10/31/03 |10001 | 1 | 200010/31/03 |10001 | 2 | 010/31/03 |10001 | 3 | 0
The output I want is the whole table as shown above but the output I get is what is in blue. If the sum(tblComponents.Weight) = 0 then now record is listed. The following is the SQLFirst Question: How can I ensure all records from tblLoadInformation are listed!SELECT tblLoadInformation.Project, tblLoadInformation.Load, tblLoadInformation.Date, Sum([tblComponents].[Weight]) AS TotalWeightFROM (tblLoadInformation INNER JOIN tblComponentSchedule ON (tblLoadInformation.Load = tblComponentSchedule.Load) AND (tblLoadInformation.Date = tblComponentSchedule.ShippingDate) AND (tblLoadInformation.Project = tblComponentSchedule.Project)) INNER JOIN tblComponents ON (tblComponentSchedule.Component = tblComponents.Component) AND (tblComponentSchedule.Project = tblComponents.Project)GROUP BY tblLoadInformation.Project, tblLoadInformation.Load, tblLoadInformation.Date
Second Question: If I inner join the tblProjectInforation table so I can get the project information, I have to add the field names to the group by clause or I will get You tried to execute a query that doesn't include the specified expression 'Name' as part of an aggregate function'Any ideas, suggestions?Mike B