Here the answere
XQuery_string: /alertlog/msg
As you can see, in this case there will be 6 rows: one for each element. And this is exactly what I want
SQL> SELECT rownum, t.*, tx.* from mytab t,
2> XMLTable('/alertlog/msg' PASSING t.XML_COLUMN) tx
XQuery_string: /alertlog/msg/txt
Also in this case I have 6 rows. But here I have only the <txt> element (it was my request)
SQL> SELECT rownum, t.*, tx.* from mytab t,
2> XMLTable('/alertlog/msg/txt' PASSING t.XML_COLUMN) tx
I skip the output between line 2 and 5.
XQuery_string: more examples
Here other two example: similar to the previous posts
SQL> SELECT rownum, t.*, tx.* from mytab t,
2> XMLTable('/alertlog/msg/[@pid="65370"]' PASSING t.XML_COLUMN) tx
SQL> SELECT rownum, t.*, tx.* from mytab t,
SQL> SELECT rownum, t.*, tx.* from mytab t,
2> XMLTable('/alertlog/msg/[@pid="65263"]' PASSING t.XML_COLUMN) tx
and if I modify the search
SQL> SELECT rownum, t.*, tx.* from mytab t,
and if I modify the search
SQL> SELECT rownum, t.*, tx.* from mytab t,
Nessun commento:
Posta un commento