xmlelement

Convert the new row to XML inside a Oracle Trigger

妖精的绣舞 提交于 2020-08-06 05:21:32
问题 Hi I am trying to create a log of changes in a table by using oracle triggers The log table consist of the ,time of action ,tablename,actiontype and xmldata (clob) Iam trying to convert the new row to xml and save it as xmldata create or replace TRIGGER EVAL_CHANGE_TriggerActual_DYNAMIC AFTER INSERT OR UPDATE OR DELETE ON PROJ_TEST REFERENCING NEW AS new OLD AS old FOR EACH ROW DECLARE log_action varchar(10); p_xmldata XMLtype; P_NEWROWDATA clob; p_newrowxml clob; BEGIN select rtrim

Convert the new row to XML inside a Oracle Trigger

时光怂恿深爱的人放手 提交于 2020-08-06 05:21:26
问题 Hi I am trying to create a log of changes in a table by using oracle triggers The log table consist of the ,time of action ,tablename,actiontype and xmldata (clob) Iam trying to convert the new row to xml and save it as xmldata create or replace TRIGGER EVAL_CHANGE_TriggerActual_DYNAMIC AFTER INSERT OR UPDATE OR DELETE ON PROJ_TEST REFERENCING NEW AS new OLD AS old FOR EACH ROW DECLARE log_action varchar(10); p_xmldata XMLtype; P_NEWROWDATA clob; p_newrowxml clob; BEGIN select rtrim

get all relational tables data using xmlelement in pl/sql

妖精的绣舞 提交于 2019-12-08 04:26:46
问题 I need to get all the connected tables data while getting values as xml Till now I can produce specific table results as below, Table1 id name rollNo 1 aaa 10 2 bbb 15 Table2 id rollNo div 1 10 a 2 15 b Query SELECT XMLElement("table1", XMLAttributes(t.id, t.name, t.rollno)) AS "RESULT" FROM table1 t where t.rollno=15 Result <table1 id="2" name="bbb" rollno="15"></table1> But this way, I am able to get data for specific table only. I want to get the xml data for all the tables related with