10 Replies Latest reply on Jun 13, 2014 11:58 AM by prassu

    Merge SQL in Writeback OBIEE 11g

    prassu

      Hello,

      I have a requirement to insert to new record from OBIEE 11g report and the table has primary key(TKT_ID) defined in the table.I am unable to insert  the null record in the DB table.Not able to achieve my requirement by using INSERT/UPDATE SQL statements.

       

      I tried with the merge SQL statement but i am unable to achieve the requirement.Below is my query.

       

      MERGE INTO A_WB A

      USING (SELECT * FROM A_WB where TKT_ID='12343') B

      ON (A.TKT_ID=B.TKT_ID)

           WHEN MATCHED THEN

          UPDATE SET OUT_CAUSE='VZ'

        WHEN NOT MATCHED THEN

          INSERT (TKT_ID,OUT_CAUSE,CUSTOMER_ID) VALUES ('12343','OTHR','21')

       

      Please correct me if i missed anything..

       

      thanks,

      prasanna