3 Replies Latest reply on Oct 16, 2015 12:47 PM by Ramesh Reddy

    insert mutiple rows in to a view table

    Prashanthi Kairuppala Novice

      Hi,

       

      I am able to do insert in to a single view table made out of multiple source tables by update procedures.

      for the below request:

      {

      "table1Field":"table1Value",

      "table2Field":"table2Value"

      }

       

      My insert query is :

      FOR EACH ROW

      BEGIN ATOMIC

        INSERT INTO OracleConn.table1 (OracleConn.table1.table1Field) VALUES ("NEW".table1Field);

        INSERT INTO OracleConn.table2(OracleConn.table2.table2Field) VALUES ("NEW".table2Field);

      END

       

      If i have multiple rows for table 2 like the below request:

      {

          "table1Field": "table1Value",

          "table2": [

              {

                  "table2Field": "table2Value1"

              },

              {

                  "table2Field": "table2Value2"

              }

          ]

      }

       

      How to insert the above data? Do i need to change my view?

       

       

      Thanks in advance,

      Prashanthi.