Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Importing Excel Data - Using PL/SQL to Loop through the Data to Import each cell as a record?

FriendlyToooFeb 22 2017 — edited Feb 22 2017

Hi Folks:

I have a couple of Excel spreadsheets that I need to import the data into a database table.  I  am easily able to import the whole row of data.   The difficult problem is that I need to be able to import each cell in the excel file as a separate record.  I have the data (15 years worth) in both the original form and in a pivoted form.

Background:

The spreadsheets store data relating to rain amount measurements and include the Area the Gauge is located (below for exampl 18, 23, 42, etc.), the Date of the rain (3/14/00 for example) and the amount of rain (0.20 inches).

The imported data though needs to be a separate record for each location/rain event/amount.    I have several Oracle IDE's (Toad, etc.) but unless I'm missing something can't do it through there.

I am wondering if it is possible to PL/SQL to maybe loop through the data after it's imported and insert the individual cell's (fields) into a different table?  If you have any other ideas I would appreciate it.

I pivoted the data (saved to a different spread sheet) to look like this:

Thanks for any help...

Matthew

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 22 2017
Added on Feb 22 2017
4 comments
959 views