以下代码以ORA-00927: missing equal sign
失败:
if (countExceed > 0) then
quer :=
'Update UID_RM_HIERARCHY I
SET I.REVIEWER_UID IN
(
SELECT L.REVIEWER_UID
FROM UID_RM_HIERARCHY L
WHERE L.UNIQUE_ID in (' || p_ID_list || ')
)
WHERE I.REVIEWER_UID in('||p_ID_list||')
AND I.isdeleted=0';
EXECUTE IMMEDIATE quer;
我应该更改些什么来解决它?
答案 0 :(得分:0)
要运行代码,您可以执行以下操作:
if (countExceed > 0) then
quer :=
'Update UID_RM_HIERARCHY I
SET I.REVIEWER_UID = -- place always a "=" and no "IN"
(
SELECT L.REVIEWER_UID
FROM UID_RM_HIERARCHY L
WHERE L.UNIQUE_ID in (' || p_ID_list || ')
AND ROWNUM = 1 -- This query has to give you a single value! Because of this we only select the first value (properbly wrong?!)
)
WHERE I.REVIEWER_UID in('||p_ID_list||')
AND I.isdeleted=0';
EXECUTE IMMEDIATE quer;
但是我强烈建议您阅读一些教程。或明确说明您在做什么。我仍然不确定您正在使用那些p_ID_list
或它包含的内容。
要获得进一步的帮助,您应该告诉我们: