QueryBuilder产生的table不能用count 返回行数?(已解决) Post By:2009/2/27 9:31:00 [只看该作者]
代码如下.... Dim q As new QueryBuilder q.TableName = "清单" q.SelectString = "select 住院ID,类别,sum(round(单价 * 用量,2)) as 金额 from [H_YIZ] where (开始日期 <= '" & d & "'and 停止日期 > '" & d & "' and 停止日期 is not null) or (开始日期 <= '" & d & "' and 停止日期 is null) and 住院ID in (" & sql & ") GROUP BY 住院ID,类别" q.C q.Build If tables("清单").rows.count > 0 Then