动态sql中如何绑定多个重复出现参数 在动态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