Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2003
    Location
    India
    Posts
    114

    Unanswered: Want to use SQL*Loader in Shell Script

    Hi

    I want to load a flat file into database table using SQL*Loader.

    A shelll need to be written which will do the required task.

    Plz help me out.

  2. #2
    Join Date
    Nov 2003
    Location
    Bangalore,India
    Posts
    51

    Soln for u

    Hey Varun,
    Its quite simple

    1. You need to create a parameter file as below
    control=d:\folder\control\fi_avg.ctl
    data=d:\folder\data\fi_avg.txt
    bad=d:\folder\bad\fi_avg.bad
    log=d:\folder\log\fi_avg.log
    discard=d:\folder\discard\fi_avg.dis
    ERRORS=9000

    2. You need to create the control file(fi_avg.ctl) in the d:\folder\control as below

    LOAD DATA
    INTO TABLE Table1
    (
    YEAR POSITION(03:06) INTEGER EXTERNAL,
    COUNT POSITION(07:14) INTEGER EXTERNAL,
    FI_AVERAGE POSITION(15:28) INTEGER EXTERNAL,
    FI_STD_DEV POSITION(29:42) INTEGER EXTERNAL
    )

    3. Place your data file in the data folder.

    I guess this should solve your problem.
    Enjoy

  3. #3
    Join Date
    Nov 2003
    Location
    India
    Posts
    114

    Thanx but I needed this from Shell

    Hi Dear

    Thanks for your time and solution. Buy actually I know how to use SQL*Loader utility. I wanted to use this utility from Shell Script. Dat was the problem. I have found the solution now.Thanks for all your help

    Bye
    Varun

Posting Permissions

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