PL / SQL [忽略SQL语句]

时间:2018-08-01 05:20:21

标签: sql database oracle plsql

我在将一些代码添加到放置在数据库中的程序包文件时遇到问题。 SQLPlus正在显示的问题是“ SQL语句被忽略”,但我无法跟踪该问题。

如果你们当中有人帮助我,试图找出问题所在,那就太好了。

谢谢。

Function getLetterheadAndLayoutConf(p_invoice_type_code IN Varchar2,
                                p_admission_type_code IN Varchar2,
                                p_accounting_type_code IN Varchar2,
                                p_costbearer_id IN Number,
                                p_institute_id IN Number,
                                p_clearing_center_id IN Number,
                                p_deduction_defined_jn IN Varchar2,
                                p_letterhead_code OUT Varchar2,
                                p_layout_code OUT Varchar2)
Return Integer IS
v_Return                    Integer;
CURSOR cRechnungLetterheadLayout(p_p_invoice_type_code Varchar2,
                                 p_p_admission_type_code Varchar2,
                                 p_p_accounting_type_code Varchar2,
                                 p_p_costbearer_id Integer,
                                 p_p_institute_id Integer,
                                 p_p_clearing_center_id Integer,
                                 p_p_deduction_defined_jn Varchar2) IS
SELECT  allc_letterhead_code, allc_layout_code
    FROM acc_letterhead_layout_conf
   WHERE (    ( allc_invoice_type_code = p_p_invoice_type_code
               OR allc_invoice_type_code IS NULL
              )
          AND ( allc_admission_type_code = p_p_admission_type_code
                 OR allc_admission_type_code IS NULL
              )
          AND ( allc_accounting_type_code = p_p_accounting_type_code
                 OR allc_accounting_type_code IS NULL
              )
          AND ( allc_costbearer_id = p_p_costbearer_id
                 OR allc_costbearer_id IS NULL
              )
          AND ( allc_clearing_center_id = p_p_clearing_center_id
                 OR allc_clearing_center_id IS NULL
              )
          AND ( allc_deduction_defined_jn = p_p_deduction_defined_jn
                 OR allc_deduction_defined_jn IS NULL
              )
         )
     AND nvl(allc_institute_id, p_p_institute_id)
ORDER BY allc_institute_id DESC, allc_sort_no ASC;
Begin
if cRechnungLetterheadLayout%ISOPEN Then CLOSE cRechnungLetterheadLayout; End 
If;
OPEN cRechnungLetterheadLayout(p_invoice_type_code, p_admission_type_code, p_accounting_type_code,
                               p_costbearer_id, p_institute_id, p_clearing_center_id,
                               p_deduction_defined_jn);
FETCH cRechnungLetterheadLayout
 into p_layout_code,
      p_letterhead_code;
CLOSE cRechnungLetterheadLayout;
dbg.i(1, 'Vorgabe Letterhead = ''' || p_letterhead_code || '''');
dbg.i(1, 'Vorgabe Layout     = ''' || p_layout_code || '''');
v_Return := 1;
End getLetterheadAndLayoutConf;

0 个答案:

没有答案