Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: excel to oracle

Re: excel to oracle

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Fri, 05 Oct 2007 08:50:13 -0700
Message-ID: <1191599413.777261.148540@g4g2000hsf.googlegroups.com>


On Oct 5, 11:16 am, Charles Hooper <hooperc2..._at_yahoo.com> wrote:
> On Oct 5, 10:37 am, "Tim B" <nos..._at_someisp.ca> wrote:
>
> > I have some data in an Excel spreadsheet - about 100 -200 records - that I
> > need to import into Oracle, likely with some transformation required. I can
> > convert it to csv or xml via MS Access and then set it up as an external
> > table and proceed from there. What other ways could you suggest that might
> > be feasible for this task? Is there another way to do it with xml as the
> > source?
>
> If you have Access, the easiest way to do this is to:
> 1. Connect to the Excel spreadsheet as an external table source in
> Excel
> 2. Create a query in Access to retrieve all rows from the Excel
> spreadsheet and rename the columns so that they match the Oracle
> table.
> 3. Create an external table source connection to the Oracle table
> (through an ODBC connection).
> 4. Modify the query definition so that it is an append query, and
> select the connection to the Oracle table.
> 5. Run the query.
>
> Much easier than it is to explain.
>
> Charles Hooper
> IT Manager/Oracle DBA
> K&M Machine-Fabricating, Inc.

Or you can just save the data as a delimited file via Excel save as and feed the delimited file into a sqlldr task that contains the reformatting functions as part of the load.

Then again you could potentially use an external table to mask the file and process it via Oracle.

Charles method is good if you know Access. If not, a little scripting can automate the file transfer and load.

The best way to do this might depend on if this is going to be a repeated process and if you want it to be customer driven or if it needs to be a regular scheduled task.

HTH -- Mark D Powell -- Received on Fri Oct 05 2007 - 10:50:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US