DECLARE
CURSOR c1
IS
SELECT
country_code, bank_name, ID
FROM
ce_bank_tmp;
v_return_status VARCHAR2 (50);
v_bank_id NUMBER;
v_msg_count NUMBER;
v_msg_data VARCHAR2 (200);
BEGIN
FOR r1 IN
c1
LOOP
ce_bank_pub.create_bank (p_country_code => r1.country_code,
p_bank_name => r1.bank_name,
x_bank_id => v_bank_id,
x_return_status => v_return_status,
x_msg_count => v_msg_count,
x_msg_data => v_msg_data
);
DBMS_OUTPUT.put_line (
r1.bank_name
|| ' has bank id '
|| v_bank_id
|| ' status '
|| v_return_status
|| ' error '
|| v_msg_data
);
UPDATE
ce_bank_tmp
SET
flag = v_return_status,
note = v_msg_data
WHERE
ID = r1.ID;
END LOOP;
END;
CE_BANK_TMP is staging
table which stored bank data before upload to oracle bank table.
No comments:
Post a Comment