Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2006
    Posts
    31

    Unanswered: Replacing new line characters

    Hi all,
    I am using a "DB2 v8.1.1.96" on AIX.

    I have select statement to select the below columns.

    TABLE ABC.A :

    ID VARCHAR(60)
    PROBLEM_NO VARCHAR(60)
    PROBLEM LONGVARCHAR(32700)

    db2 "EXPORT TO data.dat OF del modified by coldel| select ID, PROBLEM_NO, PROBLEM from ABC.A with ur;

    cat data.dat | sed "s/\"//g" > data.txt

    The issue is I am having multiple lines for the same record in data.txt file as the PROBLEM column have new line characters.
    Is there a way to use any REPLACE functions are any other way so that the text file has each record in a single line.

    Thanks all...

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    REPLACE(REPLACE(MyCol,chr(10),' '),chr(13),' ') should get you there.

    Andy

Posting Permissions

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