‎2008 May 05 7:14 AM
Hi,
I have four tables..One by one am inserting the values to tht tables from internal tables..
insert <tab name> from table <int table name>.
after i inserted in the 3rd table,it goes to insert in the fourth table.There if it already have the key field means it is throwing error..at the same time i need to rollback the insertion which was happened in the previous 3 tables..
how to do this..whether we need to use any commit orr rollback
‎2008 May 05 7:17 AM
hi there...
wat u can do is, on getting an error, apply the delete command one by one on the previous three tables...
or do one thing, while initially inserting into the first three tables, applly a join with the fourth table and check b4 insertion whether that value is already present in the fourth table or not... so that only those values are inserted which are not present in the fourth table. this way, the over head of inserting and deleting will be gone....
i think this should help. do reward if it does.... or get back with further queries.
‎2008 May 05 7:17 AM
hi there...
wat u can do is, on getting an error, apply the delete command one by one on the previous three tables...
or do one thing, while initially inserting into the first three tables, applly a join with the fourth table and check b4 insertion whether that value is already present in the fourth table or not... so that only those values are inserted which are not present in the fourth table. this way, the over head of inserting and deleting will be gone....
i think this should help. do reward if it does.... or get back with further queries.
‎2008 May 05 7:28 AM