Using continueif is sqlldr
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Using continueif is sqlldr

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Posts
    2

    Using continueif is sqlldr

    I have a data file that has multiline records with the record terminator of ctrl+Y

    ie the following is actually to be loaded as 3 records.

    A|A|test 1^M

    test 1 continues^Y
    A|B|test 2^Y
    A|C|test 3^Y

    How can I get sqlldr to load the who record into a single row?

    I have tried a control file with the following line and get an error:

    OPTIONS (ERRORS=999999, ROWS=1000)
    LOAD DATA
    TRUNCATE
    INTO TABLE AAA
    FIELDS TERMINATED BY "|"
    CONTINUEIF LAST PRESERVE <> "^Y"
    TRAILING NULLCOLS
    ( ...

    10:54:09: SQL*Loader-350: Syntax error at line 16.
    10:54:09: Expecting "(", found keyword continueif.
    10:54:09: CONTINUEIF LAST <> "^Y"

    Note the ^Y is a single character in the ctl file.

  2. #2
    Join Date
    Dec 2007
    Posts
    2
    Moving the CONTINUEIF up before the INTO line works!

    Don't know if the order of the entries in the control file are really documented but the following works:

    OPTIONS (ERRORS=999999, ROWS=1000)
    LOAD DATA
    TRUNCATE
    CONTINUEIF LAST PRESERVE <> "^Y"
    INTO TABLE AAA
    FIELDS TERMINATED BY "|"

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