|
Declare
hh dlyx.y_khda.hh%Type;
s Number :=0;
Begin
For m In (Select * From tmhb070101 t)
Loop
Select Count(*)
Into s
From dlyx.y_khda@yjdlyx k Where
substr(k.yhh,1,length(k.yhh)-3)=m.yhh And k.dw Like '0303%';
dbms_output.put_line(s);
If s = 1 Then
Select k.hh
Into hh
From dlyx.y_khda@yjdlyx k Where
substr(k.yhh,1,length(k.yhh)-3)=m.yhh;
dbms_output.put_line(hh);
Update tmhb070101 tm
Set tm.hh = hh
Where tm.yhh = m.yhh;
End If;
End Loop;
Commit;
--Select * From tmhb070101;
End;
我执行了这段程序之后,为什么tmhb070101这张表里的hh这个字段仍然没有更新过来。 |
|