How to extract portion of an xmltype column

31 views Asked by At

This is a snapshot of the xml in question

XML Layout

The column I need lies between and , but this lies inside an xmltype column called Flexfiltervalue.

How do I write the sql to extract that value and it's related ConditionGroupCode

I have tried various options

  1. select t.CONDITION_GROUP_CODE as ConditionGroupCode, instr((t.FLEX_FILTER_VALUE).getClobVal(),''), instr((t.FLEX_FILTER_VALUE).getClobVal(),''))as clobval from ZX_CONDITIONS t where t.condition_group_code = 'SU CC 50 1'

THIS RETURNED THE WRONG VALUE

  1. SELECT t.FLEX_FILTER_VALUE.getStringVal() FROM ZX_CONDITIONS t

THIS PRODUCED AN ERROR: ORA-19011: Character string buffer too small ORA-06512: at "SYS.XMLTYPE", line 169

  1. select extract(t.FLEX_FILTER_VALUE, '/').getClobVal(), <'value>' from ZX_CONDITIONS t

THIS GIVES ME MISSING EXPRESISON ERROR

0

There are 0 answers