Reputation: 5
DECLARE
attrbVal VARCHAR2(5);
updateAttrbVal varchar2(1);
BEGIN
Select Attrb_val into attrbVal from system_feature_config where feature_attrb = 'Distributor Group';
DBMS_OUTPUT.PUT_LINE(attrbVal);
IF (attrbVal = 'ON') then
updateAttrbVal := '1';
ELSE
updateAttrbVal := '0';
END IF;
EXECUTE IMMEDIATE 'Update system_feature_config SET Attrb_val= '''||updateAttrbVal||''' WHERE feature_attrb=''VA_STATE_TAX_TYPE''';
COMMIT;
END;
plsql block keeps executing and have to stop execution manually
Upvotes: 0
Views: 49
Reputation: 142743
If "keeps executing" means that it never finishes, I presume that it is because table to be updated (system_feature_config
) has been modified in another session which wasn't committed (or rolled back) yet, so your code has to wait until it is released.
What to do? Commit, or roll back.
Upvotes: 1