This is a snapshot of the xml in question
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
- 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
- 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
- select extract(t.FLEX_FILTER_VALUE, '/').getClobVal(), <'value>' from ZX_CONDITIONS t
THIS GIVES ME MISSING EXPRESISON ERROR