当前位置: 代码迷 >> Oracle技术 >> 存储过程有点有关问题请大神帮忙看看
  详细解决方案

存储过程有点有关问题请大神帮忙看看

热度:33   发布时间:2016-04-24 08:26:16.0
存储过程有点问题请大神帮忙看看
create or replace procedure proc_CLXX_List --查询

(

pro_cursor out pkg_order.p_cursor, --查询结果集

pzh_ in varchar2,--牌照号

beginTime_ in date,--创建日期上限

endTime_ in date,--创建日期上限
) is sql_str varchar2(1000):= ' select * from o_hbbz_djb a where(:pzh_ is null or a.PZH like :pzh_) and (:beginTime_ is null or a.FFTIME > :beginTime_) and (:endTime_ is null or a.FFTIME < :endTime_) and rownum<=:500 end proc_client_List';



------解决方案--------------------
SQL code
create or replace procedure proc_CLXX_List(pro_cursor out pkg_order.p_cursor,pzh_ in varchar2,beginTime_ in date,endTime_ in date)issql_str varchar2(1000):= 'select * from o_hbbz_djb a where(:pzh_ is null or a.PZH like :pzh_)         and (:beginTime_ is null or a.FFTIME > :beginTime_)         and (:endTime_ is null or a.FFTIME < :endTime_)         and rownum<=500';begin    open pro_cursor for sql_str        using pzh_,pzh_,beginTime_,beginTime_,endTime_,endTime_;end;/
  相关解决方案