oracle遇到无效lob,sql – ORA-22275错误:指定了无效的LOB定位符
我有一個用PDF文檔填充BLOB變量的過程.我想要做的是添加邏輯,僅在靜態日期的60天內顯示PDF文檔.見下文:
check_staticdate number(1);
function DisplayPDF (audit in number) RETURN blob is
person_id person.person_id%type;
z_lob blob;
blob_length NUMBER;
CURSOR getPDF(audit number) IS
select report
from report_table
where report_type = 'PDF'
and job_no = audit order by rec_no;
begin
/* Check Valid ID */
if not package.ValidID(person_id,check_only=>TRUE) then
return z_lob;
end if;
/* Here is the case statement.*/
select case
when exists
(
SELECT 'x' from table
where table_id = person_id
and trunc(sysdate) < trunc(table_static_date + 60)
)
then 1
else 0
end into check_staticdate
from dual;
if (check_staticdate = 0) then
return z_lob;
end if;
open getPDF(audit);
fetch getPDF into z_lob;
close getPDF;
return z_lob;
end DisplayPDF;
我收到的錯誤是:ORA-22275:指定了無效的LOB定位器.
我是Oracle sql的新手,并且不確定為什么我的ValidID檢查通過返回z_lob而工作,但我的case語句沒有.
編輯:添加完整的錯誤堆棧
Failed to execute target procedure ORA-22275: invalid LOB locator specified
ORA-06512: at "SYS.WPG_DOCLOAD",line 51
ORA-06512: at "User.Package",line 733
ORA-06512: at line 33
總結
以上是生活随笔為你收集整理的oracle遇到无效lob,sql – ORA-22275错误:指定了无效的LOB定位符的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数据结构之顺序队列和链式队列常用的一些操
- 下一篇: (一)prometheus与grafan