Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Location
    Kuala Lumpur, MY
    Posts
    108

    Red face Unanswered: Help with control file

    Data:
    ------
    10/10/2005 00:00:02 modbalrel - ok (msisdn = 60163050499, amount=1000, val_period = 7, seq_nb = 199370643 , balance = 1055, va
    ldate = 08/11/2005) (48 ms)

    10/10/2005 00:00:03 modbalrel - ok (msisdn = 60162433164, amount=1000, val_period = 7, seq_nb = 199370644 , balance = 987, val
    date = 03/11/2005) (133 ms)
    ------

    this is the ctrl file i written :
    Load DATA
    INFILE '/app/ITRAKPI/TRAP/TRAP_LOAD/TRAP_20051005.txt'
    APPEND INTO TABLE trap_ra_k2_ain_balance
    FIELDS TERMINATED BY ","
    (
    DATE_LOADED "(SELECT sysdate FROM dual)",
    WEEK_NO "(sELECT to_char(sysdate,'WW') FROM dual)",
    RELOAD_DATE position(01:10),
    MSISDN position(46:56),
    NEW_BALANCE
    RELOAD_AMOUNT
    )


    Guys,
    I want to load this file into my oracle database and the last two columns should be uploaded with this data

    NEW_BALANCE, RELOAD_AMOUNT
    balance = 1055,amount=1000
    balance = 987,amount=1000
    (IN WHICH i must specify from a space untill the field separator ',') and im not sure how to do it... I cant specify a position because the spaces are different and it accidentally takes the other values into the column...

    anyone can help me ??
    pls do not give me hints since its urgent....

    and anyone could help me write a .sh file for this to find sysdate-1 and load

    plssssssss

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Thumbs down


    D U P L I C A T E P O S T


    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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