PLSQL update a node in xmltype

1

I have to update a column in xmltype format of an Oracle database.

I basically only update of property valor if another property of this node the date and time are equal. That is, in the code below, I only do update on node QUAD02 and value VALOR12TIND where time is 10:12:52

<QUAD02 data="18.08.20" utilizador="30768">
    <VALOR71 titulo="N." valor="2"/>
    <VALOR72 titulo="Data" valor="18.08.20"/>
    <VALOR73 titulo="Hora" valor="10:12:52"/>
    <VALOR12TIND titulo="uuu" valor=""/>
</QUAD02>
<QUAD02 data="18.08.20" utilizador="30768">
    <VALOR71 titulo="N." valor="2"/>
    <VALOR72 titulo="Data" valor="18.08.20"/>
    <VALOR73 titulo="Hora" valor="10:15:52"/>
    <VALOR12TIND titulo="uuu" valor=""/>     
</QUAD02>

The query I used was:

update doc_g po set grelha = updatexml( grelha, 'GRELHA/quad/VALOR12TIND"/@valor' ,"ssss")
where xmlexists('$p/GRELHA/quad02/VALOR73 [@valor="10:12:52"]' passing po.grelha as "p"

The example comes from a query I do in Java. Do you have any idea how to proceed?

    
asked by anonymous 20.08.2018 / 14:04

0 answers