Wednesday, 1 February 2017

Flash query to restore the deleted data AS OF TIMESTAMP

 Lets say by mistake data from the table oe_order_holds_all got deleted by any means, you can create a temp table from flashback and get only the data which you want from this table and do criss cross.

create table ont.oe_order_holds_all_vij  as select * from  ont.oe_order_holds_all  as OF TIMESTAMP TO_TIMESTAMP('27-jan-15 00:03:00', 'dd-mon-yy hh24:mi:ss');

create table ont.oe_hold_sources_all_vij  as select * from  ont.oe_hold_sources_all  as OF TIMESTAMP TO_TIMESTAMP('27-jan-15 00:03:00', 'dd-mon-yy hh24:mi:ss');

and gave select privilege user which wanted to see the changes.

SQL Shared Area - BIND MISMATCH