W
wannabe geek
I am using MS Access 2007. My SQL reads as follows:
SELECT Packages.Package,
[Packages.BasePriceUS]+Sum([PackageModules].[Price]) AS Price
FROM Packages INNER JOIN (PackageModules INNER JOIN AnalysisResults ON
PackageModules.Package = AnalysisResults.Package) ON Packages.Package =
PackageModules.Package
WHERE (((PackageModules.Module)="Module1" Or
(PackageModules.Module)="Module2" Or (PackageModules.Module)="Module3"))
GROUP BY Packages.Package;
I want to add Packages.Price to the sum of PackageModules.Price where
PackageModules.Package equals Packages.Package. (in other words, contains a
one-to-many relationship that does not technically exist)
I keep getting the error:
'You tried to execute a query that does not include the specified expression
'[Packages.BasePriceUS]+Sum([PackageModules].[Price])' as part of an
aggregate function'
yet when I include it in an aggregate function I get:
'Cannot have aggregate function in {clause or function}'
I think my Sum function is the problem.
I am using the query designer but I will also accept SQL input.
Can anyone help?!!!!!!!
SELECT Packages.Package,
[Packages.BasePriceUS]+Sum([PackageModules].[Price]) AS Price
FROM Packages INNER JOIN (PackageModules INNER JOIN AnalysisResults ON
PackageModules.Package = AnalysisResults.Package) ON Packages.Package =
PackageModules.Package
WHERE (((PackageModules.Module)="Module1" Or
(PackageModules.Module)="Module2" Or (PackageModules.Module)="Module3"))
GROUP BY Packages.Package;
I want to add Packages.Price to the sum of PackageModules.Price where
PackageModules.Package equals Packages.Package. (in other words, contains a
one-to-many relationship that does not technically exist)
I keep getting the error:
'You tried to execute a query that does not include the specified expression
'[Packages.BasePriceUS]+Sum([PackageModules].[Price])' as part of an
aggregate function'
yet when I include it in an aggregate function I get:
'Cannot have aggregate function in {clause or function}'
I think my Sum function is the problem.
I am using the query designer but I will also accept SQL input.
Can anyone help?!!!!!!!