[PL/SQL] trigger instead of sur une XMLTYPEVIEW
comme indiqué dans le titre je veux effectuer un trigger instead of sur une vue de type xml.
ma table ressemble à ça :
Code:
1 2 3 4
|
TABLE tableT
A varchar2(20),
B varchar2(20) |
et ma vue à ça
elle est créée comme ça :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| create or replace view v of xmltype xmlschema "http://www.oracle.com/t.xsd" element "t"
with object id (extract(OBJECT_VALUE, '/t/a').getNumberVal())
as
select xmlelement(
"t",
xmlattributes(
'http://www.oracle.com/t.xsd' as "xmlns",
'http://www.w3.org/2001/XMLSchema-instance' as "xmlns:xsi",
'http://www.oracle.com/t.xsd
http://www.oracle.com/t.xsd' as "xsi:schemaLocation"),
xmlforest(
t.a as "a",
t.b as "b"
)
) from tableT t |
je veux faire une insertion sur ma vue qui me remplisse correctement ma table TableT
ce que je veux insérer est ceci :
Code:
1 2 3 4
| <t>
<a>machin</a>
<b>truc</b>
</t> |
et là je sèche complètement, je n'y arrive pas, je ne sais pas comment récupérer le contenu de <t>...</t> pour l'insérer dans la table.