使用vc ++在Oracle中将CLOB转换为varchar2 [英] Conversion of CLOB to varchar2 in oracle using vc++
本文介绍了使用vc ++在Oracle中将CLOB转换为varchar2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以在oracle数据库中使用vc ++将clob变量转换为varchar2吗?
Can we convert a clob variable to varchar2 using vc++ in oracle database?
推荐答案
您可以将CLOB的前4000个字节(取决于版本)转换为varchar2使用PL / SQL。
此链接提供了一些解决方案(在PL / SQL中) http://stackoverflow.com/questions/12860526/how-to-convert-clob-to-varchar2-inside-oracle-pl-sql [ ^ ]
我假设您已经在使用VC ++与您的oracle数据库进行交互,所以只需像调用其他任何方式一样调用sql,或者设置一个功能/程序来完成并从你的项目中调用它
--------
我已经找到了一个例子,其中CLOB已被拆分为varchar2的集合,这可能比我原来的答案更有帮助。 https://community.oracle.com/thread/2438977 [ ^ ]
You can convert the first 4000 bytes (depending on version) of the CLOB to varchar2 using PL/SQL.
This link provides some solutions (in PL/SQL) http://stackoverflow.com/questions/12860526/how-to-convert-clob-to-varchar2-inside-oracle-pl-sql[^]
I presume you are already using VC++ to interact with your oracle database so just call the sql as you would any other, or set up a function/procedure to do it and call that from your project
--------
I have since found an example where a CLOB has been split into a collection of varchar2 which might be more helpful than my original answer. https://community.oracle.com/thread/2438977[^]
这篇关于使用vc ++在Oracle中将CLOB转换为varchar2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文