0

I don't have time to write a perl or anything like that nor do I have admin access to the back end, so how can I get data from a file on the intranet (http://) and parse it to create a table? Maybe somehow via PL/SQL? Keep in mind I don't have much admin access.

4
  • Is this a one-time load? An ongoing process? Are you trying to completely automate it or is a process that involves human intervention acceptable? Commented Feb 21, 2012 at 18:50
  • I want it to be automated. But from what I understand I can use PL/SQL scheduler to do that. Commented Feb 21, 2012 at 18:53
  • duplicate of stackoverflow.com/questions/6198863/… Commented Feb 21, 2012 at 23:05
  • @alfasin...not a duplicate...different question. Commented Feb 23, 2012 at 15:12

3 Answers 3

4

If you want it to be completely automated

  • You can use the UTL_HTTP package to retrieve the data from the HTTP server
  • You can either parse the CSV response yourself using INSTR and SUBSTR or you can use the UTL_FILE package to write the data to a file on the database server file system and then create an external table that parses the CSV file you just created.
  • You can then insert the parsed data into a table you've already created (I'm assuming that the CSV data is in the same format each time).
  • You can use the DBMS_SCHEDULER or DBMS_JOB package to schedule the job

The Oracle database account you're using will need to be granted access to all of these packages.

Sign up to request clarification or add additional context in comments.

Comments

0

You may download the file into your host machine and then use SQL*Loader to populate a table.

Other ways there are some wizards that may be easier than SQL*Loader, if you are using IDEs like PLSQLDeveloper(Tools->Text Importer) or SQLDeveloper(right click on Tables-> Import Data).

Comments

0

Create an external table that references your CSV file. That means you can run select statements on the file from within Oracle.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.