create or replace procedure ImportDate_Test(str_year in varchar2) isbegin  insert into sta_statistics_01
    (year, import_export, import, export)
    select packet_date || '年',
           sum(DOLLAR) 进出口,
           sum(case
                 when search_no = '0' then
                  dollar
                 else
                  0
               end) 进口,
           sum(case
                 when search_no = '1' then
                  dollar
                 else
                  0
               end) 出口      from (select substr(packets_date, 1, 4) packet_date,
                   i.dollar,
                   substr(SEARCH_NO, 9, 1) search_no
              from sta_department_info i
             where substr(SEARCH_NO, 9, 1) in('0','1') and substr( packets_date,1,4 )=str_year
             group by substr(packets_date, 1, 4),
                      i.dollar,
                      substr(SEARCH_NO, 9, 1))  group by packet_date; /*插入年度表的*/
                 end ImportDate_Test;这个存储过程编译过不了,是哪里问题呢? 老提示已编译但有错误oracle  存储过程 编译过不了