Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    2

    Unanswered: SQLLDR - Computed Column

    Hello

    I have to load a csv file into a table using SQLLDR.
    The CSV file has a value Symbol. I have to load this into a table in two different columns. one as Symbol and the other Symbl_shrt as substr(Symbol,1,8).

    My ctl file looks like this.
    LOAD DATA
    TRUNCATE INTO TABLE ADV_SEC
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (
    SEC_TYPE CHAR,
    SYMBOL CHAR,
    SYMBOL_SHRT CHAR SUBSTR(YMBOL,1,8)
    )

    When I execute I get an error
    Expecting "," or ")" found SUBSTR

    Please help.

  2. #2
    Join Date
    Jun 2003
    Posts
    2

    Re: SQLLDR - Computed Column

    Originally posted by leenaas
    Problem Resolved. I had to use
    SYMBOL_SHRT CHAR "SUBSTR(YMBOL,1,8)"

    Hello

    I have to load a csv file into a table using SQLLDR.
    The CSV file has a value Symbol. I have to load this into a table in two different columns. one as Symbol and the other Symbl_shrt as substr(Symbol,1,8).

    My ctl file looks like this.
    LOAD DATA
    TRUNCATE INTO TABLE ADV_SEC
    FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (
    SEC_TYPE CHAR,
    SYMBOL CHAR,
    SYMBOL_SHRT CHAR SUBSTR(YMBOL,1,8)
    )

    When I execute I get an error
    Expecting "," or ")" found SUBSTR

    Please help.

Posting Permissions

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