谁能告诉我为什么这不会编译?我得到了一个“失踪的表情”#39;错误:
execute immediate 'select CASE WHEN EXISTS ( SELECT 1 from samples where samplecode = :samplecode and auditflag = 0 and ' || varFilterString || ') then 1 else 0 end from DUAL'
into varResult
using varSampleCode;
假设所有变量都已正确声明。
TIA
答案 0 :(得分:2)
execute immediate 'select count(1) from DUAL
where EXISTS
( SELECT 1 from samples
where samplecode = :sample code
and auditflag = 0
and ' || varFilterString || ')'
into varResult
using varSampleCode;