获取ORA-00904:执行过程时标识符错误

时间:2013-11-06 10:46:26

标签: sql oracle procedures

CREATE OR REPLACE FUNCTION CONCAT_BLOB(A in BLOB,B in BLOB) RETURN BLOB IS
 C BLOB;
BEGIN
DBMS_LOB.APPEND (C,A);
DBMS_LOB.APPEND (C,B);
RETURN C;
END;

CREATE OR REPLACE PROCEDURE update_NEW_REC_tmp is 


 tempBlob BLOB :=utl_raw.cast_to_raw('^');

  begin 

  execute immediate  'update audt set new_rec= CONCAT_BLOB(tempBlob,new_rec)' ;
    commit;

    end;

exec update_NEW_REC_tmp;

执行程序时出错:ORA-00904:“TEMPBLOB”:标识符无效

1 个答案:

答案 0 :(得分:0)

我认为你必须在你的匿名声明中使用绑定变量:

update audt set new_rec= CONCAT_BLOB(tempBlob,new_rec)

tempBlob和new_rec变量超出范围。

我认为您可以提供有用的Oracle文档:click here

相关问题