#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2007
    Posts
    25
    Rep Power
    0

    Sql loader skip blank line


    I am running Oracle 9 and using sql loader to import text file into table. Can sql loader skips the record which blank line or carriage return? Do I need to set up with options? Please advise me how. Thanks.
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    853
    Rep Power
    387

    Cool


    Originally Posted by hakeem777
    I am running Oracle 9 and using sql loader to import text file into table. Can sql loader skips the record which blank line or carriage return? Do I need to set up with options? Please advise me how. Thanks.
    If the blank lines are at the beginning of the data file, use OPTIONS(SKIP=n), otherwise if the blank lines are in between data rows, use 'WHEN' as the following example:
    Code:
    load data
    infile 'MyData.dat'
    into table test_tab truncate
    when id != BLANKS
    fields terminated by ','
    (id, ....etc...)

IMN logo majestic logo threadwatch logo seochat tools logo