【问题标题】:Why i get Erreur(196,24): PLS-00306: wrong number or types of arguments in call to 'C_MOTIFS'为什么我得到 Erreur(196,24):PLS-00306:调用“C_MOTIFS”时参数的数量或类型错误
【发布时间】:2020-12-03 12:23:19
【问题描述】:

我创建了一个游标 C_MOTIFS 并得到 Erreur(196,24): PLS-00306: wrong number or types of arguments in call to 'C_MOTIFS'

Cursor C_MOTIFS(num_doss varchar2 ) Is
                    
               SELECT
                    f.protocol_nr,
               CASE
                   WHEN folder_state IN ('09', '10','37','16','07')
                   THEN
                       codes.justification_code
                 
               END AS code_motif,
               
               CASE
                   WHEN folder_state IN ('09', '10','37','16','07')
                   THEN
                       code.justification_code_descr    
               END AS descr_motif
               
          FROM his_folder f
               
         WHERE  f.FOLDER_TYPE_CODE ='10' and f.protocol_nr=num_doss;
FOR SM IN C_MOTIFS
                    LOOP
                        ret_motifs.extend;
                        ret_motifs(nb_motifs):= MOTIF(
                                            SM.code_motif,
                                            SM.descr_motif
                                            );
                        nb_motifs := nb_motifs +1;
                    END LOOP;

【问题讨论】:

    标签: oracle plsql


    【解决方案1】:

    您已经创建了参数化光标。

    Cursor C_MOTIFS(num_doss varchar2 ) IS
    

    从光标中删除参数

    Cursor C_MOTIFS IS
    

    或者在调用 cutor 时传递一些 varchar2 值:

    FOR SM IN C_MOTIFS(varchar_value)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-22
      • 2014-10-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多