pass parameter into sqlloader .ctl
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: pass parameter into sqlloader .ctl

Hybrid View

  1. #1
    Join Date
    Oct 2002
    Posts
    182

    pass parameter into sqlloader .ctl

    I am on Unix-Solaris with Oracle 9i

    I want to pass a parameter (timezone) into a sqlloader control file.

    The line I need the parameter to go into is:
    PHP Code:
            MKT_PRICE_DT "new_time(to_date(:MKT_PRICE_DT,'YYYY-MM-DD HH24:MI:SS'),'$1','GMT')"
    Our timezone changes from EDT to EST and I want to automate this.
    I tried using:
    `date +'%Z'`
    also tried hardcoding a parameter in the shell script:
    timezone=$(date +'%Z')

    I keep getting errors.
    Any advice or assistance is helpful. Thanks.
    - Cookies

  2. #2
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    replace the string in the CTL file at run time using shell script/perl or whatever, then execute sqlldr & replace back the clt with string it was.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  3. #3
    Join Date
    Oct 2002
    Posts
    182
    do you mean construct the string in the shell and then pass it into the control file?
    - Cookies

  4. #4
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    dont pass, edit the control file itself & when your are done replace back/edit the controlfile to what it was originally.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

Posting Permissions

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


Click Here to Expand Forum to Full Width