Hi,
1) Oracle will not rollback itself. You will have catch the exceptions and handle them.
2) How much of data? If the data is not too much then all methods are almost the same.
3) You can drop the table when procedure is running. One thing I can think of immediately.
Regards,
Ravindran
Main Topics
Browse All Topics





by: nerdzollPosted on 2007-06-18 at 19:45:32ID: 19312786
Hi David,
l1, r_original_table.col2 ..., r_original_table.col*n*, NULL) --Note where i have inserted null, you would want to insert the YEAR (just extract from SYSDATE), as a note the columns when you insert need to be in the order of the table you are inserting into so put the additional column wherever it should go.
I myself have only been working with PL/SQL for about 5 months so I will give you as best answer as I can. Hopefully someone else will back me up.
1. If you have not specified any commit and an application error is raised then Oracle will automatically roll back any changes (as stated that is *only* if you have not specified a commit before the error has occured).
2. This is an easy one, do:
DECLARE
CURSOR c_original_table
IS
SELECT * FROM ORIGINAL_TABLE
BEGIN
FOR r_original_table IN c_original_table
LOOP
INSERT INTO BACKUP_TABLE VALUES(r_original_table.co
--Insert Commit Here for a commit after each row
END LOOP;
--Insert Commit Here for a commit after total table processed.
END;
3. to make the program fail to test, add in something liiike
raise_application_error (-20101, 'No data found to upload'); )that will raise a user defined application error
Hope that helps you out.
Regards
Stuart