0

这是我的程序代码:

   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;
4

1 回答 1

0

您的过程中有许多输出,您可以将这些数据存储在表中然后检索它们。无论如何,至于你的错误:你是用 varchar 还是引号传递第一个参数。它应该是数字。我还注意到参数 Idate_e 是 varchar 但是它似乎你正在传递日期值。尝试如下

DECLARE
phonenumb NUMBER;
process_s varchar2, 
type_e varchar2, 
status_s varchar2, 
acceptor_r varchar2, 
donor_r varchar2, 
porting_g varchar2, 
Idate_e date, 
Fdate_e date, 
ancom_d varchar2, 
status_f varchar2, 
error_r varchar2, 
creation_n  varchar2
begin 
 phone_info (1123,process_s,process_s,type_e,status_s,acceptor_r,donor_r,porting_g,Idate_e,Fdate_e,ancom_d,status_f,error_r,creation_n);
end;
/
于 2017-09-29T12:28:23.113 回答