create or replace procedure P_CabLocGrid (v_start in number,v_sum in number,condition in varchar2,v_result out sys_refcursor)
is
begin
if condition is not null and condition<>'' then
execute immediate 'open v_result for select distinct substr(PLACE_SN,v_start,v_sum) from T_BLANK_CERT_VISA where AREA_CODE=' || condition ;
end if ;
end P_CabLocGrid;
***************************************************************************execute immediate 'open v_result for select distinct substr(PLACE_SN,v_start,v_sum) from T_BLANK_CERT_VISA where AREA_CODE=' || condition ;
而且上面这句话要加一个varchar2的字符串,如果加入这个条件呢,
is
begin
if condition is not null and condition<>'' then
execute immediate 'open v_result for select distinct substr(PLACE_SN,v_start,v_sum) from T_BLANK_CERT_VISA where AREA_CODE=' || condition ;
end if ;
end P_CabLocGrid;
***************************************************************************execute immediate 'open v_result for select distinct substr(PLACE_SN,v_start,v_sum) from T_BLANK_CERT_VISA where AREA_CODE=' || condition ;
而且上面这句话要加一个varchar2的字符串,如果加入这个条件呢,
解决方案 »
- 一个简单的java调用oracle 函数试题,求高手指点
- 请教oracle utl_file的问题
- UNION筛选过程,怎样查看ORACLE隔离级别,SERVER PROCESS问题
- oracle如何一次读取多条语句??
- ORA-01489: result of string concatenation is too long
- 请教数据文件移动问题.
- #求一个含组织机构树的查询统计sql#
- ora-00054:资源正忙,要求指定NOWAIT
- 关于Thin(瘦)的问题
- 黄菜鸟问问题,ORA-12638是什么问题,是网络问题吗,急死了,期待高手指点一二,不胜感激
- mysql 过程捕捉异常
- 一个关于ORACLE数据库更新语句的优化
is
begin
if condition is not null and condition<>'' then
open v_result for 'select distinct substr(PLACE_SN,v_start,v_sum) from T_BLANK_CERT_VISA where AREA_CODE=:v1 and xxxx=:v2 and ...' using condition,condition ... ;
end if ;
end P_CabLocGrid;