首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

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

2012-08-31 
存储过程有点问题请大神帮忙看看create or replace procedure proc_CLXX_List --查询(pro_cursor out pkg_

存储过程有点问题请大神帮忙看看
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;/ 

热点排行