1 Reply Latest reply: May 7, 2013 11:08 PM by Pnauduri-Oracle RSS

    sql loader want to skip unwanted charcters from a flat file while loading

    1003592
      Hi all,

      i have some character "/" is placed in flatfile while unloading data to a flat file from database. how to skip that "/" while loading it back.

      for a column if i have the data in table as " Iam a DBA" . in flat file it has like " iam / a / dba". for space it is unloading as '/'.
      when i want to reaload data from flat file "iam / a / dba" to database as " Iam a DBA" is there a way i can Skip "/" while loading data
        • 1. Re: sql loader want to skip unwanted charcters from a flat file while loading
          Pnauduri-Oracle
          In SQL*Loader control file, you have to use CONTINUEIF clause if that character is not a delimeter e.g.

          LOAD DATA
          INFILE 'T1.dat'
          CONTINUEIF LAST = "\\" --->
          PRESERVE BLANKS INTO TABLE xyz --> This is optional.
          APPEND
          FIELDS TERMINATED BY '~' OPTIONALLY ENCLOSED BY '"'


          Is it a "/" or "\"?. In my example I am using "\" so I had to escape with an additional "\". That is why you see double "\". In your case if it is "/" then try "\/".

          Hope this helps..

          Prakash