我想在存储过程参数中传递多个值

时间:2016-01-12 04:28:06

标签: sql

这是我想要在v_supp_list中传递多个值的过程。所以光标我的意思是选择查询部分返回行,每当我测试程序返回没有行。请帮帮我。

提前致谢。

create or replace procedure report_supp_vendregrem
     (v_supp_list in varchar2,
      my_cur out sys_refcursor) as
begin

  open my_cur for
    select a.sup_code,
           a.sup_name,
           a.sup_add1,
           a.sup_Add2,
           a.sup_add3,
           a.sup_pin,
           c.profile,
           lpad(rownum, 4, 0) letter_no,
           b.user_name,
           d.user_desg,
           a.sup_tmp_code,

           decode(e.flag,
                  1,
                  'Sub : Reminder (1) for Renewal of Vendor Registration',
                  2,
                  'Sub : Reminder (2) for Renewal of Vendor Registration',
                  3,
                  'Sub : Reminder (3) for Renewal of Vendor Registration',
                  'Sub : Reminder for Renewal of Vendor Registration') hdr1,
           'Your current vendor registration with ASP will expire / has expired on ' ||
            to_char(a.reg_valid, 'dd/mm/yyyy') ||
            '. Henceforth we may not be in a position to issue' ||
            ' Tender Enquiry to you, until your renewal of registration. A renewal form is enclosed herewith. If you are interested in further renewal of registration' ||
            ' you may please fill up the details as required and submit the same along with the renewal fee of Rs ' ||

            decode(e.flag, 1, 5000, 2, 5000, 3, 5000, 2000) ||
            '/-  in the form of Demand Draft drawn' ||
            ' in favour of "SAIL a/c ALLOY STEELS PLANT" or else we may exclude your name from our registered Vendor List. Please fill up the details as' ||
            ' required & send for renewal to us by ??' body1
      from mm_supplier_mst_t        a,
           mm_sup_profile_t         c,
           aspadmin.user_login_t    b,
           aspadmin.asp_user_master d,
           mm_supp_renew_t          e
     where a.sup_code = c.sup_code
       and a.sup_code = e.sup_code
       and b.user_code = 29
       and b.user_id = d.user_id
       and a.reg_f != 'P'
       and c.profile is not null
          -- and a.reg_valid between v_valid_date and v_valid_date1;
       and e.sup_code in (v_supp_list);
end;

0 个答案:

没有答案