【发布时间】:2015-02-05 12:52:40
【问题描述】:
谁能告诉我为什么这不会编译?我收到“缺少表达式”错误:
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
【问题讨论】:
-
检查您的 varFilterString ,它可能格式错误。具体来说,它可能是 Null。
-
Oracle query won't compile 的可能重复项