|
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;
After I executed this procedure, why the field hh in the table tmhb070101 is still not updated. |
|