| 发表于:2007-12-28 09:33:26 楼主 |
看过前面一些帖子,写了一个, update db2gkdp.f2dd_trn_sch a set a.effective_flg = (select distinct b.effective_flg from db2gkdp.f2dd_trn_sch a, db2gkdp.f2dd_trn_mode b where a.ship_fr_factory_cd = b.ship_fr_factory_cd and a.ship_to_factory_cd = b.ship_to_factory_cd and a.trn_mode_cd = b.trn_mode_cd) 但是,当检索出的数据 〉2时, 错误发生: sql0811n the result of a scalar fullselect, select into statement, or values into statement is more than one row. 试问,这种方法是不是只适用于当检索为1条时。 如果是多条的时候,如何写才能更新多条。 |
|
|
|
|