Results 1 to 4 of 4

Thread: Sqlloader

  1. #1
    Join Date
    Apr 2004
    Posts
    113

    Unanswered: Sqlloader

    Hello!

    I need to run this shell script but I need to run it for 5/20/2004.

    This script is for the day before.
    Attached Files Attached Files

  2. #2
    Join Date
    May 2004
    Posts
    29
    I am new too but you can get date from your script:

    --------------------------------------
    get_date() {
    $ORACLE_HOME/bin/sqlplus -s username/password << EOF
    set verify off
    pagesize 0
    feedback off

    col xnewday format a8

    select to_char(sysdate, 'YYYYMMDD') xnewday -1 from dual;
    ---------------------------------------

    get_date | read YESTERDAY
    if [$? -ne 0]; then
    Print "cannot find the date"
    exit1
    fi
    ---------------------------------------
    sqlplus -s username/password @$[your path]/file_name $YESTERDAY
    exit

  3. #3
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482
    Hardcode the "day" variable in your shell script to:

    export day=`Thu`

    then run your script.


    HTH,

    clio_usa - OCP 8/8i/9i DBA

  4. #4
    Join Date
    Apr 2004
    Posts
    113
    clio_usa,

    If I hard code it with the day which will be the 18th that will be Tuesday which is today and it will run twice.

    Correct?

    Is there a way to hard code dates?

    My datafiles that are being called are like this:

    Search.20040518

Posting Permissions

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