在Oracle中将CLOB转换为varchar2 [英] CLOB to varchar2 conversion in oracle

查看:3284
本文介绍了在Oracle中将CLOB转换为varchar2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在varchar2中获取以下查询的结果以在视图中显示.我尝试如下使用dbms_lob.substr,但随后出现错误"ORA-22922:不存在的LOB值".

I need to get the result of the below query in varchar2 to display in a view. I tried using dbms_lob.substr as below but then it gives me error "ORA-22922: nonexistent LOB value".

dbms_lob.substr((从NEXUS_TRAC_TRAVEL_PLAN_DTL中选择wm_concat(tr_country) 其中nexus_year = trdata.nexus_year 和nexus_seq_no = trdata.nexus_seq_no),4000,1),

dbms_lob.substr((select wm_concat(tr_country) from NEXUS_TRAC_TRAVEL_PLAN_DTL where nexus_year = trdata.nexus_year and nexus_seq_no = trdata.nexus_seq_no),4000,1) ,

select查询在CLOB中返回结果.

The select query is returning result in CLOB.

推荐答案

WM_CONCAT返回VARCHAR2,而不是CLOB.因此,您可以删除对DBMS_LOB.SUBSTR的呼叫.

WM_CONCAT returns a VARCHAR2, not a CLOB. So you can remove the call to DBMS_LOB.SUBSTR.

这篇关于在Oracle中将CLOB转换为varchar2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆