Results 1 to 6 of 6
  1. #1
    Join Date
    Aug 2007
    Posts
    3

    Exclamation Unanswered: sqlloader and replace function

    I need to know if it is possible to define multiple replace function for a column
    and how it works.
    ex:
    LOAD DATA
    INFILE data.TXT
    INTO TABLE rl_test
    REPLACE
    fields terminated by "" TRAILING NULLCOLS
    (c "REPLACE(:c,'a','b','f','g')"
    I tried but it gave an error message such as 'too many values...'
    can you help me, please? thanks dridri

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    It seems that you are looking for DECODE function, not REPLACE.

  3. #3
    Join Date
    Aug 2007
    Posts
    3
    Hi, thank for your attention. The problem is that I think i can't use the 'decode' function in sqlloader. I have a txt file to load in a table but the format of some field is wrong . I would like to avoid the eror message in order to loading all records. In other way the limit of 50 errors is fulfilled and the loading interrupts or dicsrds too many records.the field we are considering is defined as float external, i replace '.' with',' and it works. But from few months some records register the value of 000-10.00 instead of
    -00010.00 and in this way the format is not recognized. I tried ti replace the string but i need to do 'multiple ' replacement. Do you know how can I do it? Please halp me . A lot of thenk for your attention. dridri

  4. #4
    Join Date
    Aug 2007
    Posts
    3
    Hi, thank for your attention. The problem is that I think i can't use the 'decode' function in sqlloader. I have a txt file to load in a table but the format of some field is wrong . I would like to avoid the eror message in order to loading all records. In other way the limit of 50 errors is fulfilled and the loading interrupts or dicsrds too many records.the field we are considering is defined as float external, i replace '.' with',' and it works. But from few months some records register the value of 000-10.00 instead of
    -00010.00 and in this way the format is not recognized. I tried ti replace the string but i need to do 'multiple ' replacement. Do you know how can I do it? Please halp me . A lot of thenk for your attention. dridri

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    use EXTERNAL TABLE & PL/SQL instead of 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.

  6. #6
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    I think I understand now; could you try with something like this?
    Code:
    (c TRANSLATE (:c, 'af', 'bg')

Posting Permissions

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