在动态sql中我需要绑定多个条件参数,其中部分存在重复出现的参数,请问这种情况open cur_Record For L_Sql Using 的参数如何绑定,难道只能一个个按顺序重复写?
说明:cur_Record 是一个定义的游标变量,L_Sql为动态sql语句,内容如下
with aa as (
Select * from tableA
where testKey = :P_TestKey
),
bb as(
Select * from tableB
Where SchoolKey := P_SchoolKey
And testKey = :P_TestKey
)
Select *
From TableC cc
Left Join aa ON aa.StudentKey = cc.StudentKey
Left Join bb On bb.studentKey = cc.StudentKey
Where cc.TestKey = :P_TestKey
And cc.ClassKey = :P_ClassKey请教大家了,谢谢!
说明:cur_Record 是一个定义的游标变量,L_Sql为动态sql语句,内容如下
with aa as (
Select * from tableA
where testKey = :P_TestKey
),
bb as(
Select * from tableB
Where SchoolKey := P_SchoolKey
And testKey = :P_TestKey
)
Select *
From TableC cc
Left Join aa ON aa.StudentKey = cc.StudentKey
Left Join bb On bb.studentKey = cc.StudentKey
Where cc.TestKey = :P_TestKey
And cc.ClassKey = :P_ClassKey请教大家了,谢谢!
解决方案 »
- 想在oracle数据库里面用动态的sql向表中插入10000条数据,但是老报错,望指点下!
- dbms_datapump导出dmp文件时NAME_LIST的长度超过了4000该怎么办
- 急~~sqlldr 的一个问题
- 一个纠结的oracle数据库分页问题
- oracle支持零宽断言正则表达式吗???
- 分组取最大N条记录方法
- 手动拷贝ORACLE中所有DBF文件后的问题
- imp 从A用户含有主键导入b 用户出错?如何处理???救命。。。
- 请问分析redolog出现这种错误怎么办?(10分)
- PRO*C的问题
- oracle exp/imp字符集导致中文乱码
- 如何写出sql语句实现按照数值区间分组统计求和
open cur_Record for L_sql using P_TestKey,P_SchoolKey,P_TestKey,P_TestKey,P_ClassKey但我想问的是有没有其他的绑定方法,如简化成
open cur_Record for L_sql using P_TestKey,P_SchoolKey,P_ClassKey
这样的话比较简洁清晰