Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Unanswered: create temp table from text file

    I am trying to create a temp table by reading a text file. (name.txt)
    If I have text file like following:

    name1 name2 name3
    city1 city2

    I am trying to create a temp table for each row.
    For example, for the first row, I will have a temp table list this:

    ID colname
    1 name1
    2 name2
    3 name3
    After examined by a stored proc, it will be deleted and temp table for second row will be created.

    My problem is I could not find a good way to create such temp table.
    I tried SQL Loader, but it did not work out.
    Please give me some suggestions and comments about how to do this.

  2. #2
    Join Date
    Feb 2004

    You can use PL/SQL to create these tables using in the following manner.. you can generate the query based on the parameters in lines and then execute the query.

    query:='create table ......';
    execute immediate query;

    Missed Call Alerts

  3. #3
    Join Date
    Mar 2004

    Re: create temp table from text file

    Originally posted by loug52
    You can use EXTERNAL TABLE feature of Oracle 9a and you wont even have to load the data. This is a much easier alternative to sqlloader.. Then you can use normal DML to create temporary table or whatever.

    Sudip Datta
    Server Technologies
    Oracle Corporation

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts