当前位置:首页 » 多媒体相关

pb根据存储过程生成datawindow的问题


在oracle8i中存储过程中的select语句必须带into子句,有没有办法象mssql中一样  
  create   procedure   up  
  as  
  select   t.col1,   t.col2,   t.col3   from   t

推荐阅读

  • 业绩展望不是越高越好 投资者为此损失不小 [详细内容]
  • Sun:Java将学习开放源代码 [详细内容]
  • 电脑上写短消息,大S上发 [详细内容]
  • 终端商三招出击暑期市场 打破局限走联合路 [详细内容]
  • BEA宣布Beehive源代码获取方式 [详细内容]
  • 715到756 升级记----关于同步的心得 [详细内容]
  • 华硕新品 SONOMA 笔记本重磅轰击暑期市场 [详细内容]
  • 网友回答:
    网友:qiyousyc

    可以  
      create   or   replace   package   pkg_test  
      as  
            type   myrctype   is   ref   cursor;  
      end   pkg_test;  
      /  
      create   procedure   sp_fauleinfo(pagentid   in   varchar2,p_rc   out   pkg_test.myrctype)  
      as  
      begin  
      open   p_rc   for   select   agent_id,agent_name   from   failinfo   where   agentid=||pagentid;  
      end;  
       
       
       
       
      /*以下是我的存储过程*/  
      create   or   replace   procedure   afc_report_note(  
            organcode   in   varchar,  
            date1   in   date,  
            date2   in   date,  
            other   in   varchar2,  
            l_cursor   out   ref_cursor.service_cursor)  
      as  
            s_content1   varchar(500);  
            s_content2   varchar(500);        
            ls_date       varchar(30);  
            date3           date;  
            v_ratio1       ratio.ratio_fee1%type;  
            v_ratio2       ratio.ratio_fee1%type;  
            v_tf           subsect.subsect_tpc%type;  
            v_rc           subsect.subsect_spt%type;  
            v_fee1       subsect.subsect_tpc%type;    
            v_fee2       subsect.subsect_tpc%type;  
            v_net         subsect.subsect_tpc%type;          
            v_fee         subsect.subsect_tpc%type;    
            s_fee1       varchar2(100);  
            s_fee2       varchar2(100);  
            s_fee         varchar2(100);  
            s_tf           varchar2(100);              
            s_net         varchar2(100);                    
      begin  
            v_ratio1:=0;  
            v_ratio2:=0;  
              /*   读取费率*/  
              select   max(ratio_date)   into   date3   from   ratio    
                          where   ratio_date<=date1   and   organ_code=organcode;  
              select   ratio_fee1,ratio_fee2   into   v_ratio1,v_ratio2   from   ratio  
                          where   ratio_date=date3   and   organ_code=organcode;                  
       
              /*计算有效*/  
              select   sum(a.subsect_spt+a.subsect_srt),  
                    sum(a.subsect_tpc+a.subsect_trc)   into   v_rc,v_tf  
                    from   subsect   a  
                          where   a.organ_code=organcode  
                              and   a.subsect_date=date1;  
              /*转换日期*/  
              afc_datetochinese(date1,ls_date);                          
              /*计算公交服务费*/  
              v_fee1:=round(v_tf*v_ratio1/100,2);  
              /*计算电子收费服务费*/    
              v_fee2:=round(v_tf*v_ratio2/100,2);                      
              /*总服务费*/  
              v_fee:=v_fee1+v_fee2;  
              /*实付*/  
              v_net:=v_tf-v_fee1-v_fee2;  
              /*转换*/  
              afc_numtochinese(v_fee1,s_fee1);  
              afc_numtochinese(v_fee2,s_fee2);  
              afc_numtochinese(v_net,s_net);          
              afc_numtochinese(v_tf,s_tf);                  
              afc_numtochinese(v_fee,s_fee);                  
          s_content1:=               贵司||ls_date||的电子收费交易数据经系统清分~n后,||  
        确认有效的交易消费额为人民币||s_tf||,||  
        交易笔数||trim(to_char(v_rc))||条。扣交易服务费||s_fee||  
                                。实付贵司||s_net||,||  
                                  请贵司予以确认。如确认无误,将按上述款项划到贵司帐户。;  
      s_content2:=               我司确认||ls_date||的电子收费有效交易消费额为人民币||  
        s_tf||(||trim(to_char(v_tf,9999999.99))||元),应付贵司交易服务费||s_fee||  
                                。||  
                                请广州交通电子收费运营有限公司和广州市公共交通数据管理中心将实付金额||s_net||  
                                划到我单位帐户。   ;  
            open   l_cursor   for  
            select   date1   querydate,  
                    organcode   organ_code,  
                    s_content1   ls_content1,  
                    s_content2   ls_content2                
                    from   dual;  
      end   afc_report_note;  
       
       
     

    .

    讨论区

    Login