【发布时间】:2010-10-30 13:59:33
【问题描述】:
我想使用 MS Access 交叉表查询提取数据,以便将其绑定到报表。加载页面时出现运行时错误“3637”:无法使用非固定列的交叉表作为子查询。
我想要一种在运行查询时恢复固定网格的方法,如果单元格为空,则显示零。
【问题讨论】:
-
这是一个例子。根据过滤器中的日期,它会返回不同数量的列。 TRANSFORM Sum(tblCharting.Hours) AS SumOfHours SELECT tblCharting.DateofService FROM tblCharting RIGHT JOIN tlkpServiceLocations_SQL ON tblCharting.ServiceLocation = tlkpServiceLocations_SQL.ID WHERE (((tblCharting.DateofService) 在 #5/1/2009# 和 #5/5/2009# 之间)) 分组 tblCharting.DateofService, tblCharting.DateofService PIVOT tlkpServiceLocations_SQL.LocationName;我希望始终返回相同数量的列,即查找表中的行。