Ask the Expert

Inserting all new data at one time, not individually

I have a developer who wants to send all the data to be inserted into a table at one time rather than send individual records. He will be using VB and the database is 8.1.7.x on NT4.0. Do you have any ideas/examples of how to do this? I've looked a little into using PL/SQL tables but that seems rather complex.

    Requires Free Membership to View

In order to do a bulk insert, one will have to temporarily store the data to be inserted until the time of the bulk insert. This can be done many ways, but typically the data is temporarily stored in a file somewhere. Then, when it is time to bulk insert the data, the file is read, the contents are inserted into the table, and then the file is cleared out. There are many ways to accomplish this. One can use PL/SQL and the UTL_FILE package to open the file and insert the data. You can write a Perl routine that uses DBI to interface with the database. If the file is a text file, then you can even use Oracle's SQL*Loader utility to load the data!

For More Information


This was first published in February 2003

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: