RE: Advice needed on PL/SQL code

2003-01-30 Thread Mercadante, Thomas F
Beth, Since your archiving process involves many tables, I think the best approach for you would be as follows: Create a work table that will hold the primary key value for the master table. the first step of your process would involve selecting the records to be archived from the master table,

RE: Advice needed on PL/SQL code

2003-01-30 Thread Beth Wells
Thanks Tom, this is an excellent solution! I used to do something similar when I worked with SQL Server, because it's good to avoid cursors with SQL Server, but I didn't think of it this time. Thanks again all, Beth -Original Message- Thomas F Sent: Thursday, January 30, 2003 6:44 AM

RE: Advice needed on PL/SQL code

2003-01-29 Thread Richard Ji
Robert, Thanks for point that out. Also, if there is index on the table, redo will still be generated for index. Richard -Original Message- Sent: Tuesday, January 28, 2003 10:54 PM To: Multiple recipients of list ORACLE-L /*+ append */ alone does not prevent redo generation. Only

RE: Advice needed on PL/SQL code

2003-01-29 Thread Beth Wells
Thanks all, this is helpful information for my boss, who wants to schedule a procedure to bulk copy data between tables on a regular basis. For my own problem, I should have been more specific in my example, but I was thinking more about my boss' issue than my own. (What a great employee I am!)

Advice needed on PL/SQL code

2003-01-28 Thread Beth Wells
Hi all, Please forgive this newbie question; I'm just getting started with PL/SQL. I want to write a procedure to copy all rows from one table to another one with an identical structure. The table has many rows so I'm committing every thousand records (error handling to be added later). The

RE: Advice needed on PL/SQL code

2003-01-28 Thread Richard Ji
If it's a lot of rows and looks like you are archiving it to a historical table, you could do: insert /*+ append */ into target_table select * from source_table; this will do a direct path insert, so it uses space above HWM. It doesn't generate redo. Richard -Original Message- Sent:

RE: Advice needed on PL/SQL code

2003-01-28 Thread Robert Freeman
/*+ append */ alone does not prevent redo generation. Only with NOLOGGING in the SQL will redo generation be suppressed. Cheers! RF -Original Message- Sent: Tuesday, January 28, 2003 6:29 PM To: Multiple recipients of list ORACLE-L If it's a lot of rows and looks like you are