Results 1 to 5 of 5

Thread: SQL Loader

  1. #1
    Join Date
    Apr 2004
    Posts
    9

    Unanswered: SQL Loader

    Hi guys,

    Can use the SQL loader to load the data from a file to all the columns of a table

    in the sense , I want to create one control file and use the file repeatedly for many tables by just passing the data file and the parameter

    I dont want to hard code the values of the column names in the table ,

    Can we use some thing like

    load data
    infile 'c:\data\mydata.csv'
    into table emp
    fields terminated by "," optionally enclosed by '"'
    ( *) ---With out the column names

    Thanks,

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    AFAIK, the column names are required.
    Keep in mind, that even if you could wildcard the column names, you'd be limited to VARCHAR2 datatypes.
    What is preventing you from declaring the files as external tables?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Apr 2004
    Posts
    9

    SQL Loader

    Hi,

    Thanks for your repply

    the only thing I am concerned about is , I have to type the column names for all the 100 tables we are planning to load

    Thanks,
    Deepak

  4. #4
    Join Date
    Jul 2003
    Posts
    2,296
    why do you have to type?

    cut and paste
    select column_name from cols where table_name = 'YOUR_TABLE';
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  5. #5
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Amen Duck !!!! Let SQL write the necessary stuff for you ....
    Let SQL write SQL ... One of the greatest things invented since sliced bread...

Posting Permissions

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