wpg_docload.download_file(v_filename); exception when others then v_filename := null; end process_download; バイナリ・ラージ・オブジェクト(BLOB)のダイレクト・ダウンロード・メカニズムを使用して、BLOBをデータベース表からダウンロードします。このためには、次に示すように...
BEGIN -- executable part starts here NULL; -- EXCEPTION -- exception-handling part starts here END "GETCURSORS"; END "HR_DATA"; 「OK」をクリックして「Preview SQL」ウィンドウを閉じます。 「New Package」ウィンドウで「OK」をクリックし、新しいパッケージを保存します。 新しいパッ...
BEGIN FORALL indx IN 1 .. l_eligible_ids.COUNT SAVE EXCEPTIONS UPDATE employees emp SET emp.salary = emp.salary + emp.salary * increase_pct_in WHERE emp.employee_id = l_eligible_ids (indx); EXCEPTION WHEN OTHERS THEN IF SQLCODE = -24381 THEN FOR indx IN 1 ..SQL%BULK_EXCEPTIONS....
row_for_employee_id ( employee_id_in IN employees.employee_id%TYPE) RETURN employees%ROWTYPE IS l_employee employees%ROWTYPE; BEGIN SELECT * INTO l_employee FROM employees e WHERE e.employee_id = row_for_employee_id.employee_id_in; RETURN l_employee; EXCEPTION WHEN NO_DATA_FOUND THEN ...
CREATE OR REPLACE TRIGGER order_info_insert INSTEAD OF INSERT ON order_info DECLARE duplicate_info EXCEPTION; PRAGMA EXCEPTION_INIT (duplicate_info, -00001); BEGIN INSERT INTO customers (customer_id, cust_last_name, cust_first_name) VALUES ( :new.customer_id, :new.cust_last_name, :new.cust...
BEGIN SELECT val INTO answer FROM role_level_config_params WHERE role_id = p_role_id AND name = p_param; RETURN answer; -- Found EXCEPTION WHEN no_data_found THEN NULL; -- Fall through to following code END; -- Is parameter set at application level? BEGIN SELECT val INTO answer FROM...
trans_type; END IF; COMMIT; EXCEPTION WHEN NO_DATA_FOUND OR nonexistent THEN :status := 'Nonexistent account'; WHEN OTHERS THEN err_msg := SUBSTR(SQLERRM, 1, 70); :status := 'Error: ' || err_msg; END; END-EXEC; --- end PL/SQL block --- display 'Status: ', status; ENDLO...
('Excellent'); WHEN grade = 'B' THEN DBMS_OUTPUT.PUT_LINE('Very Good'); WHEN grade = 'C' THEN DBMS_OUTPUT.PUT_LINE('Good'); WHEN grade = 'D' THEN DBMS_OUTPUT.PUT_LINE('Fair'); WHEN grade = 'F' THEN DBMS_OUTPUT.PUT_LINE('Poor'); END CASE;EXCEPTIONWHEN CASE_NOT_FOUND ...
('Message: '||wf_log.log_message); v_failure := v_failure + 1; END LOOP; IF (v_failure = 0) THEN DBMS_OUTPUT.PUT_LINE('Workflow Status: SUCCEEDED'); ELSE DBMS_OUTPUT.PUT_LINE('Workflow Status: FAILURE'); END IF; EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('Error: '||...
イメージを45度回転します。 コピー DECLARE image BLOB; BEGIN SELECT img INTO image FROM timg WHERE N=2402 FOR UPDATE; -- rotate image ORDSYS.ORD_IMAGE.rotate(image,45); UPDATE timg SET img=image WHERE N=2402; COMMIT; EXCEPTION WHEN OTHERS THEN RAISE; END; /5.37...