update DCC set DRR=
(select cast((CAST((SUM(EMI)/100) AS DECIMAL(2,2))+CAST((SUM([REPO ARREAR])/100) AS DECIMAL(2,2))) as decimal(2,2))/((TOTAL*35)/100)/0.01
from dcc
where (CURR_DATE BETWEEN '2014-01-01' and '2014-01-03')
GROUP BY TOTAL)
这是我的查询我必须使用select查询将值存储在DRR中。使用select语句更新查询
Error: Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression. The statement has been terminated.
只有当查询返回多次相同的值时,“TOP 1”才是相关的。 –
是的,公平的一点。 –