我想更新一个表的字段,可是写完报ora-00936缺少表达式,代码贴出来,高手帮着看看,小生感激不尽
update GATHER_STATISTICS t
set BATCH_SUCCESS_COUNT = select decode(cnt, 0,0) as cnt
from ((SELECT count(g.WARNING_TYPE) as cnt
from jk_gather_info_history g
where g.WARNING_TYPE = 0
and g.batch_id = t.batch_id
and t.userid = 2
and g.gather_date >=
to_date('2009-4-7 16:24:24',
'yyyy-mm-dd HH24:MI:SS')
and g.gather_date <=
to_date('2009-4-7 16:24:27',
'yyyy-mm-dd HH24:MI:SS')
group by t.batch_id))
[b]问题补充:[/b]
感谢lovewhzlq的回答,但是还是不行,还是报同样的错误