Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert Into....Select

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi

I'm using an "Insert into....Select" statement to process and insert rows from one table into another. The average no. of rows inserted is about 200,000.

The statment may look like this:
INSERT INTO W_SALES
SELECT ITM , GRS_DMD
FROM Sales
WHERE TO_CHAR(DTE) = TO_CHAR(sysdate)

For every 5000 records, I need to COMMIT the records into the table.

How can I do this? For Some reason if the INSERT statement fails, is there a way that only a portion would have been inserted?

Thanks for the help.
 
You may use cursor loop, but performance will degrade. Though you may try to improve it using BULK COLLECT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top