Hello:
I am trying to bring back a recordset using the following SQL statement.
(the statement uses data shaping). However, the YEAR keeps giving me a
datatype mismatch in the criteria. Any ideas?
I've put *** beside the problem area i think:
SHAPE {SELECT DISTINCTROW tblBrand.BrandName, tblTransaction.ModelNumber,
Month([TransactionDate]) AS theMonth, Format$([tblTransaction].
[TransactionDate],'mmmm", "yyyy') AS dMonth, Count
(tblTransaction.InvoiceID) AS UnitSold, Year([TransactionDate]) AS theYear
FROM tblBrand INNER JOIN tblTransaction ON tblBrand.BrandID =
tblTransaction.BrandID
GROUP BY tblBrand.BrandName, tblTransaction.ModelNumber, Month
([TransactionDate]), Format$([tblTransaction].
[TransactionDate],'mmmm", "yyyy'), Year([TransactionDate])
HAVING (((Year([TransactionDate]))= 2001)) ***
ORDER BY tblBrand.BrandName, tblTransaction.ModelNumber, Month
([TransactionDate]);
} AS AnnualBrandSales COMPUTE AnnualBrandSales BY 'BrandName'
Thanks
H Lam