Hi all
Another SQL query! I am getting up to speed with using Access but this one is a bit too complicated for me and I am not sure if it is even possible.
I have been trying to figure out a way of adding to the query below, a column that displays amount of sales for each product within a date range.
SELECT Product.[Product reference] AS Ref, Product.[Short description] AS [Product Name], qryFindAllCustomVars_Crosstab.SUPPLIERREF AS [Supplier Ref], Format(IIf([sTax1OpaqueData]="301=1750.00=0=" Or [sTax1OpaqueData]="301=1750=0=",(Product.price/100)*1.175,product.price/100),"Fixed") AS [Gross Price], Product.nStockOnHand AS [Stock Level], qryFindAllCustomVars_Crosstab.SRCHPRODUCT AS [Made in], qryFindAllCustomVars_Crosstab.SRCHCOLOUR AS Colour, qryFindAllCustomVars_Crosstab.SRCHBRAND AS Brand, qryFindAllCustomVars_Crosstab.NETPURCHASEPRICE AS [NET cost]
FROM [Catalog section] AS [Catalog section_1] INNER JOIN (qryFindAllCustomVars_Crosstab INNER JOIN ([Catalog section] INNER JOIN Product ON [Catalog section].nSectionID = Product.nParentSectionID) ON qryFindAllCustomVars_Crosstab.sProductRef = Product.[Product reference]) ON [Catalog section_1].nSectionID = [Catalog section].nParentSectionID
WHERE ((([Catalog section_1].bExcludeFromFroogle)=0) AND ((Product.bExcludeFromFroogle)=0));
I have assumed this needs to involve the Orders table but it is clearly alot more complicated than I can do!
Any suggestions or pointers would be appreciated.
Paul
KJ Beckett
Another SQL query! I am getting up to speed with using Access but this one is a bit too complicated for me and I am not sure if it is even possible.
I have been trying to figure out a way of adding to the query below, a column that displays amount of sales for each product within a date range.
SELECT Product.[Product reference] AS Ref, Product.[Short description] AS [Product Name], qryFindAllCustomVars_Crosstab.SUPPLIERREF AS [Supplier Ref], Format(IIf([sTax1OpaqueData]="301=1750.00=0=" Or [sTax1OpaqueData]="301=1750=0=",(Product.price/100)*1.175,product.price/100),"Fixed") AS [Gross Price], Product.nStockOnHand AS [Stock Level], qryFindAllCustomVars_Crosstab.SRCHPRODUCT AS [Made in], qryFindAllCustomVars_Crosstab.SRCHCOLOUR AS Colour, qryFindAllCustomVars_Crosstab.SRCHBRAND AS Brand, qryFindAllCustomVars_Crosstab.NETPURCHASEPRICE AS [NET cost]
FROM [Catalog section] AS [Catalog section_1] INNER JOIN (qryFindAllCustomVars_Crosstab INNER JOIN ([Catalog section] INNER JOIN Product ON [Catalog section].nSectionID = Product.nParentSectionID) ON qryFindAllCustomVars_Crosstab.sProductRef = Product.[Product reference]) ON [Catalog section_1].nSectionID = [Catalog section].nParentSectionID
WHERE ((([Catalog section_1].bExcludeFromFroogle)=0) AND ((Product.bExcludeFromFroogle)=0));
I have assumed this needs to involve the Orders table but it is clearly alot more complicated than I can do!
Any suggestions or pointers would be appreciated.
Paul
KJ Beckett
Comment