【发布时间】:2015-03-14 05:26:05
【问题描述】:
我的查询如下,其中包含一个子查询:
select a.bill_prvdr_acct_id, a.acct_id, a.bill_prvdr_acct_strt_dt, a.bill_prvdr_acct_end_dt
from xxxx_snapshot.dbo.bill_prvdr_acct_history a
where a.acct_id in
(select acct_id, count(*)
from xxxx_snapshot.dbo.bill_prvdr_acct_history
group by acct_id
having count(*) > 1)
我收到错误消息“当 EXISTS 未引入子查询时,选择列表中只能指定一个表达式。”
【问题讨论】:
-
去掉 count(*) 作为选择值。
-
你用的是什么数据库?