解决方案 »

  1.   

    i:=i+1改了还是不行什么错误呢,错误信息贴点
    C IN VARCHAR
      

  2.   

    i:=i+1改了还是不行什么错误呢,错误信息贴点
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.C:\Documents and Settings\wanghu06>sqlplus NielsenLinx/i#uB1Y@LXCH01PR_APPSQL*Plus: Release 10.2.0.3.0 - Production on 星期五 5月 9 11:41:24 2014Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    连接到:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management,
    OLAP,
    Data Mining and Real Application Testing optionsSQL> exec whq_procedure
    BEGIN whq_procedure; END;      *
    第 1 行出现错误:
    ORA-06550: 第 1 行, 第 7 列:
    PLS-00905: object NIELSENLINX.WHQ_PROCEDURE is invalid
    ORA-06550: 第 1 行, 第 7 列:
    PL/SQL: Statement ignored
    SQL> exec whq_procedure
    BEGIN whq_procedure; END;      *
    第 1 行出现错误:
    ORA-06550: 第 1 行, 第 7 列:
    PLS-00905: object NIELSENLINX.WHQ_PROCEDURE is invalid
    ORA-06550: 第 1 行, 第 7 列:
    PL/SQL: Statement ignored
    SQL> exec whq_procedure
    BEGIN whq_procedure; END;      *
    第 1 行出现错误:
    ORA-06550: 第 1 行, 第 7 列:
    PLS-00905: object NIELSENLINX.WHQ_PROCEDURE is invalid
    ORA-06550: 第 1 行, 第 7 列:
    PL/SQL: Statement ignored
    SQL> create or replace procedure whq_procedure is
      2  cursor whq_cursor0 is select distinct city from tmp_whq_guizhou_t2;
      3  cursor whq_cursor(c in varchar(100))
      4  is
      5  select city,item,shu from tmp_whq_guizhou_t2 where city=c order by shu desc
    ;
      6  begin
      7  for cur1 in whq_cursor0 loop
      8       for cur2 in whq_cursor(cur1.city) loop
      9            i:=0;
     10            insert into tmp_whq_guizhou_t(rowname,colname,cnt,colorder) value
    s(cur2.city,i,cur2.item,cur2.shu);
     11            i=i+1;
     12      end loop;
     13  end loop ;
     14  end;
     15  、
     16
     17
     18
     19
     20  从 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Produc
    tion
    With the Partitioning, Real Application Clusters, Automatic Storage Management,
    OLAP,
    Data Mining and Real Application Testing options 断开C:\Documents and Settings\wanghu06>sqlplus NielsenLinx/i#uB1Y@LXCH01PR_APPSQL*Plus: Release 10.2.0.3.0 - Production on 星期五 5月 9 11:50:57 2014Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.
    连接到:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management,
    OLAP,
    Data Mining and Real Application Testing optionsSQL> exec whq_procedure
    BEGIN whq_procedure; END;      *
    第 1 行出现错误:
    ORA-06550: 第 1 行, 第 7 列:
    PLS-00905: object NIELSENLINX.WHQ_PROCEDURE is invalid
    ORA-06550: 第 1 行, 第 7 列:
    PL/SQL: Statement ignored
    SQL> exec whq_procedure
    BEGIN whq_procedure; END;      *
    第 1 行出现错误:
    ORA-06550: 第 1 行, 第 7 列:
    PLS-00905: object NIELSENLINX.WHQ_PROCEDURE is invalid
    ORA-06550: 第 1 行, 第 7 列:
    PL/SQL: Statement ignored
    SQL> exec whq_procedure
    BEGIN whq_procedure; END;      *
    第 1 行出现错误:
    ORA-06550: 第 1 行, 第 7 列:
    PLS-00905: object NIELSENLINX.WHQ_PROCEDURE is invalid
    ORA-06550: 第 1 行, 第 7 列:
    PL/SQL: Statement ignored
    SQL>
      

  3.   

    好了,找出错误了
    i:=i+1改了还是不行什么错误呢,错误信息贴点
    C IN VARCHAR  c in varchar2