Inserting Data in XML into Oracle database

后端 未结 1 535
刺人心
刺人心 2021-01-15 16:40

My task is to get data from One database (non oracle db) and insert that data into another database(oracle).

I am able to get the data from the source database in

1条回答
  •  自闭症患者
    2021-01-15 17:17

    This is as generic as I can make it without seeing the xml structure..

    create or replace procedure put_stuff_into_table(source_xml_doc xmltype) AS
    
    BEGIN
    
    insert into table (a, b)
    select *
    from xmltable(''
                  passing source_xml_doc
                  columns a number        path 'ELEMENT_TAG_A',
                          b varchar2(100) path 'ELEMENT_TAG_B'
                 );
    END;
    / 
    

    0 讨论(0)
提交回复
热议问题