Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    76

    Unanswered: SQL Loader using Escape Character.

    Hi,

    I'm having a problem that is making me going crazy, and needed some help about it.

    I'm importing an informix database to oracle, and informix uses | as separator.

    So far so good ... but in some cases I have certains tables which columns have the | characer (sometimes multiple times).
    I realise that Informix puts the backlash as a Escape Characterm but I am not being able to use it with SQL Loader.

    Can anyone help me on this?

    Thanks!

  2. #2
    Join Date
    Aug 2003
    Location
    West
    Posts
    101
    If there are | inside the column data, does informix enquote the data? I should think it would, and then your control file for sqlldr would contain
    LOAD DATA
    INFILE *
    APPEND INTO TABLE empmast
    FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY ' " '

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    I think you are going to have to change the content of the file before using it with SQLLDR.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  4. #4
    Join Date
    Dec 2003
    Posts
    76
    Quote Originally Posted by Ida Hoe View Post
    If there are | inside the column data, does informix enquote the data? I should think it would, and then your control file for sqlldr would contain
    LOAD DATA
    INFILE *
    APPEND INTO TABLE empmast
    FIELDS TERMINATED BY "|" OPTIONALLY ENCLOSED BY ' " '
    No, it does not. Informix only puts it like this:
    20|text1|xxx\|zzz\|aaa\|bbb)|

    Where "xxx\|zzz\|aaa\|bbb)" is the value of the last field within the exported file. In informix database, that value is "xxx|zzz|aaa|bbb)" wich means that informix is creting the escape character correctly.
    The problem is that I am not being able to use the Escape Character to identify that \| is just an |...
    Last edited by aucrun; 02-22-11 at 16:05.

Posting Permissions

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