这是我的程序代码:
CREATE OR REPLACE PROCEDURE phone_info (
numar IN order_detail_data.phone_number%TYPE,
process_s OUT VARCHAR2,
type_e OUT VARCHAR2,
status_s OUT VARCHAR2,
acceptor_r OUT VARCHAR2,
donor_r OUT VARCHAR2,
porting_g OUT VARCHAR2,
Idate_e OUT VARCHAR2,
Fdate_e OUT VARCHAR2,
ancom_d OUT VARCHAR2,
status_f OUT VARCHAR2,
error_r OUT VARCHAR2,
creation_n OUT VARCHAR2)
IS
BEGIN
SELECT od.process_type,
NVL (od.subscription_type_fd, od.process_type),
c."STATUS",
od.recipient_id,
od.donor_id,
oda.porting_id,
NVL (od.initial_date, TO_DATE ('31-12-9999', 'DD-MM-YYYY')),
NVL (od.final_date, TO_DATE ('31-12-9999', 'DD-MM-YYYY')),
oi.REG_PORTING_ID,
s.sub_status,
NVL2 (oj.error_description, oj.error_description, s.sub_status),
oda.sys_creation_date
INTO process_s,
type_e,
status_s,
acceptor_r,
donor_r,
porting_g,
Idate_e,
Fdate_e,
ancom_d,
status_f,
error_r,
creation_n
FROM order_data od
LEFT JOIN order_detail_data oda ON od.porting_id = oda.porting_id
LEFT JOIN order_sub_statuses s ON s.id = oda.sub_status_id
LEFT JOIN order_reject_details oj ON oda.porting_id = oj.porting_id
LEFT JOIN order_id oi ON oda.porting_id = oi.porting_id
LEFT JOIN order_bpm_processes bx ON oda.porting_id = bx.porting_id
LEFT JOIN order_detail_statuses c ON c.id = oda.status_id
WHERE oda.phone_number = numar;
-- Afisare dbms_output.put_line('######### DONE #########');
-- dbms_output.put_line('Process: ' || process_s);
-- dbms_output.put_line('TYPE: ' || type_e);
-- dbms_output.put_line('Status: ' || status_s);
-- dbms_output.put_line('Acceptor: ' || acceptor_r);
-- dbms_output.put_line('Donor: ' || donor_r);
-- dbms_output.put_line('Porting: ' || porting_g);
-- dbms_output.put_line('Idate: ' || Idate_e);
-- dbms_output.put_line('Fdate: ' || Fdate_e);
-- dbms_output.put_line('Ancom_ID: ' || ancom_d);
-- dbms_output.put_line('Status_flow: ' || status_f);
-- dbms_output.put_line('Error: ' || error_r);
-- dbms_output.put_line('Creation: ' || creation_n);
-- dbms_output.put_line('######### FINISHED #########');
END;