Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Getting error in XQuery when XML contents is too long

3378658Sep 27 2017 — edited Sep 28 2017

I am running the following query:

select x.*

from DRMAPPS t

   , xmltable(

       xmlnamespaces(

         'http://www.oracle.com/drm' as "drm"

      )

     , '

        for $d in /drm:MetadataExport/drm:PropertyDefinitions/drm:PropertyDefinition[drm:Parameters/drm:PropDefParam/@Abbrev = "Formula"]

        for $p in /drm:MetadataExport/drm:PropertyDefinitions/drm:PropertyDefinition

        where contains($d/drm:Parameters/drm:PropDefParam[@Id = "0"]/drm:Value, $p/@Abbrev)

        return <r def="{$d/@Abbrev}" used="{$p/@Abbrev}" />

      '

       passing t.XMLCONTENTS

       columns defined_prop  varchar2(80) path '@def'

             , used_prop     varchar2(80) path '@used'

     ) x

where t.APPNAME = 'drm.xml'    

;

and this runs fine when the Value node referred to in the where clause is a short string. But when it is very long, as it sometimes is, I get the error

ORA-01706: user function result value was too large

Lots of searching didn't lead me to any possible workaround. I'm not trying to return a long string, just use it in the contains function. Can anyone suggest a way to make this work for long strings?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 26 2017
Added on Sep 27 2017
4 comments
850 views