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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值