sql – ORA-22275错误:指定了无效的LOB定位符
发布时间:2020-12-12 07:44:18 所属栏目:MsSql教程 来源:网络整理
导读:我有一个用PDF文档填充BLOB变量的过程.我想要做的是添加逻辑,仅在静态日期的60天内显示PDF文档.见下文: check_staticdate number(1); function DisplayPDF (audit in number) RETURN blob isperson_id person.person_id%type;z_lob blob;blob_length NUMBER;
我有一个用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 解决方法首先暂时初始你的吊球DBMS_LOB.CREATETEMPORARY(z_lob,true); --true if you want it to be cached. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- sql-server – 备份master数据库的频率是多少?
- SqlServer——批量操作(批量添加,删除)
- sqlserver 中使用sqlcmd 执行几百M的.sql文件
- CSharp之ADO.NET操作SqlServer数据库数据导入导出
- Sql Transaction – SQL Server还是C#?
- 浅谈sql连接查询的区别 inner,left,right,full
- sql-server – 如何在ssis中将空白转换为null
- 使用dreamhost空间实现MYSQL数据库备份方法
- sql-server – 免费的SQL Server数据库管理器
- SQL Server Sysobjects Xtype 类型介绍