I have a simple union query
SELECT
qryItemTimeStatus.ItemID AS ItemID,
qryItemTimeStatus.ItemName,
qryItemTimeStatus.TimeSysStatus_FK AS TimeStatus,
qryItemTimeStatus.TotalMinutes
FROM
qryItemTimeStatus
UNION SELECT
qryItemTimeStatus_Missing.ItemID AS ItemID,
qryItemTimeStatus_Missing.ItemName,
qryItemTimeStatus_Missing.TimeStatus AS TimeStatus,
qryItemTimeStatus_Missing.TotalMinutes
FROM
qryItemTimeStatus_Missing;
In the original query TotalMinutes is a calculated field
I then want to use a crosstab to show the total minutes for each time category
TRANSFORM
First(qryItemTimeStatus_All.[TotalMinutes]) AS FirstOfTotalMinutes
SELECT
qryItemTimeStatus_All.[ItemID],
qryItemTimeStatus_All.[ItemName],
First(qryItemTimeStatus_All.[TotalMinutes]) AS [Total Of TotalMinutes]
FROM
qryItemTimeStatus_All
GROUP BY
qryItemTimeStatus_All.[ItemID],
qryItemTimeStatus_All.[ItemName]
PIVOT [TimeSysStatus_FK];
This gives me an error "The microsoft engine does not recognize the field or expression [itemID]". If However i make a table from my union query the cross tab works fine. I have googled this error and it only points to parameter references, which I have none. Any help would be appreciated.
Posted by: plpoppe@gmail.com
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (1) |
Tidak ada komentar:
Posting Komentar