H
Henry
HELP!
I am trying to execute a crosstab query and receive the following error message
The Microsoft Jet database engine does not recognize "[Connection Inventory].[Connection Inventory ID]" as a valid field name or expression
The crosstab query is based on another query that works fine by itself. This query has criteria to limit the records retrieved from a table (one to many relationship) to only the most current record. If I delete this sub query, the crosstab query works fine (except that it retrieves too many records). The sub query that causes the crosstab query to fail is
(([Project Phase History].[Date])=(Select Max ( [Date]) From [Project Phase History] Where [Project Phase History].[Connection Inventory ID] = [Connection Inventory].[Connection Inventory ID]))
The complete query is
SELECT [Project Phase].[Project Phase Grouping], [Project Phase History].Date, [Connection Inventory].[Connection Inventory ID], [Application Master].[Application Master], [Application Master].[Deactivated Application Indicator
FROM [Project Phase] INNER JOIN ((([Application Master] INNER JOIN Application ON [Application Master].[Application Master ID] = Application.[Application Master ID]) INNER JOIN [Connection Inventory] ON Application.[Application ID] = [Connection Inventory].[Application ID]) INNER JOIN [Project Phase History] ON [Connection Inventory].[Connection Inventory ID] = [Project Phase History].[Connection Inventory ID]) ON [Project Phase].[Project Phase ID] = [Project Phase History].[Project Phase ID
WHERE ((([Project Phase].[Project Phase Grouping])=2 Or ([Project Phase].[Project Phase Grouping])=3) AND (([Project Phase History].[Date])=(Select Max ( [Date]) From [Project Phase History] Where [Project Phase History].[Connection Inventory ID] = [Connection Inventory].[Connection Inventory ID])) AND (([Application Master].[Deactivated Application Indicator])=False))
The Crosstab query is
TRANSFORM Count([Active Connections Summary Query].[Connection Inventory ID]) AS [CountOfConnection Inventory ID
SELECT [Active Connections Summary Query].[Application Master], Count([Active Connections Summary Query].[Connection Inventory ID]) AS [Total Of Connection Inventory ID
FROM [Active Connections Summary Query
GROUP BY [Active Connections Summary Query].[Application Master
PIVOT [Active Connections Summary Query].[Project Phase Grouping]
It appears that the crosstab query is unable to evaluate the subquery at execution time. Is there anyway around this
Help
Thank
Henry
I am trying to execute a crosstab query and receive the following error message
The Microsoft Jet database engine does not recognize "[Connection Inventory].[Connection Inventory ID]" as a valid field name or expression
The crosstab query is based on another query that works fine by itself. This query has criteria to limit the records retrieved from a table (one to many relationship) to only the most current record. If I delete this sub query, the crosstab query works fine (except that it retrieves too many records). The sub query that causes the crosstab query to fail is
(([Project Phase History].[Date])=(Select Max ( [Date]) From [Project Phase History] Where [Project Phase History].[Connection Inventory ID] = [Connection Inventory].[Connection Inventory ID]))
The complete query is
SELECT [Project Phase].[Project Phase Grouping], [Project Phase History].Date, [Connection Inventory].[Connection Inventory ID], [Application Master].[Application Master], [Application Master].[Deactivated Application Indicator
FROM [Project Phase] INNER JOIN ((([Application Master] INNER JOIN Application ON [Application Master].[Application Master ID] = Application.[Application Master ID]) INNER JOIN [Connection Inventory] ON Application.[Application ID] = [Connection Inventory].[Application ID]) INNER JOIN [Project Phase History] ON [Connection Inventory].[Connection Inventory ID] = [Project Phase History].[Connection Inventory ID]) ON [Project Phase].[Project Phase ID] = [Project Phase History].[Project Phase ID
WHERE ((([Project Phase].[Project Phase Grouping])=2 Or ([Project Phase].[Project Phase Grouping])=3) AND (([Project Phase History].[Date])=(Select Max ( [Date]) From [Project Phase History] Where [Project Phase History].[Connection Inventory ID] = [Connection Inventory].[Connection Inventory ID])) AND (([Application Master].[Deactivated Application Indicator])=False))
The Crosstab query is
TRANSFORM Count([Active Connections Summary Query].[Connection Inventory ID]) AS [CountOfConnection Inventory ID
SELECT [Active Connections Summary Query].[Application Master], Count([Active Connections Summary Query].[Connection Inventory ID]) AS [Total Of Connection Inventory ID
FROM [Active Connections Summary Query
GROUP BY [Active Connections Summary Query].[Application Master
PIVOT [Active Connections Summary Query].[Project Phase Grouping]
It appears that the crosstab query is unable to evaluate the subquery at execution time. Is there anyway around this
Help
Thank
Henry