SQL提取部分的blob

时间:2016-06-16 13:17:42

标签: sql xml blob

我在从数据库中的blob字段中提取数据时遇到问题。 blob的内容看起来像这样:

<?xml version="1.0" encoding="ISO-8859-1"?><preferences><timezone>Asia/Singapore</timezone><displayscheduleinusertimezone>N</displayscheduleinusertimezone><locale>English</locale><dateformat>d/MMM/yyyy</dateformat><timeformat>hh:mm aaa</timeformat><longformat>Long_01</longformat>

我想在<locale></locale>之间提取字符串(在我们的例子中,这将是&#34;英语)。

到目前为止,我只能使用以下代码提取blob的完整内容:

SELECT trim(utl_raw.cast_to_varchar2(dbms_lob.substr(preferences,2000,1)))
from User_Preferences

任何快速而肮脏的伎俩让我的上线符合我的需要? :)

0 个答案:

没有答案
相关问题