Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2002
    Location
    PUNE, INDIA
    Posts
    25

    Question Unanswered: REMOVE SPECIAL CHARACTERS in a column data

    Guys,

    Anyone has ideas about how to remove control characters such as Carriage returns from a data column in a DB2 database table.

    --RAHool

  2. #2
    Join Date
    May 2003
    Location
    Phoenix, US
    Posts
    39
    Hi,
    Can we try the following options

    1. Export the table data to a file using the export utility (DEL format)
    2. Modify the file to remove the control characters
    3. Load with replace option to table with an empty file
    3. Import the modified file to the table.

    Thanks
    Sateesh

  3. #3
    Join Date
    Dec 2002
    Location
    PUNE, INDIA
    Posts
    25

    Exclamation

    Originally posted by msateeshkumar
    Hi,
    Can we try the following options

    1. Export the table data to a file using the export utility (DEL format)
    2. Modify the file to remove the control characters
    3. Load with replace option to table with an empty file
    3. Import the modified file to the table.

    Thanks
    Sateesh
    Exporting to a file and loading it back into the database is a issue, as there are multiple control characters in the data. Also, the REPLACE function is not much of help as the chr() to get the Control characters seems to be a issue. Its not working properly or i might not be using the right chr() function.

    I am using REPLACE(column1, chr(10), '').
    But his is not helping even chr(13) is not helping ...

    thanks for the help mate..

    --RAHool

  4. #4
    Join Date
    May 2003
    Location
    Phoenix, US
    Posts
    39
    Hi,
    Can you send me the list of control characters which exist in the database.

    Thanks
    Sateesh

    Originally posted by gemini95117
    Exporting to a file and loading it back into the database is a issue, as there are multiple control characters in the data. Also, the REPLACE function is not much of help as the chr() to get the Control characters seems to be a issue. Its not working properly or i might not be using the right chr() function.

    I am using REPLACE(column1, chr(10), '').
    But his is not helping even chr(13) is not helping ...

    thanks for the help mate..

    --RAHool

  5. #5
    Join Date
    Dec 2002
    Location
    PUNE, INDIA
    Posts
    25
    Thanks,

    I am attaching a txt file for your reference. It has the table details and the data (3 rows) which is split across multiple lines.

    --RAHool
    Attached Files Attached Files

Posting Permissions

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