Results 1 to 4 of 4

Thread: CR/LF db2

  1. #1
    Join Date
    Jun 2002
    Location
    Nantes (France)
    Posts
    5

    Arrow Unanswered: CR/LF db2

    How can I do to repalce the CR/LF characters with a SQL command (db2) ?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You need to be more elaborate on what you want to do. The more specific you are the more we are willing to help.

    Where are the CR/LF characters? What do you want to replace them with. Why?

    Andy

  3. #3
    Join Date
    Jun 2002
    Location
    Nantes (France)
    Posts
    5
    The CR/LF characters are in as string which is in a column. How do you do to replace CR/LF by a space ?



    Originally posted by ARWinner
    You need to be more elaborate on what you want to do. The more specific you are the more we are willing to help.

    Where are the CR/LF characters? What do you want to replace them with. Why?

    Andy

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You would need to create a UDF to replace the CR/LF with a single blank. If you are ok with turning each occurance of them into blanks, i.e. each CR becomes a blank AND each LF becomes a blank, you can use the TRANSLATE function as such TRANSLATE(col,' ',concat(chr(10),chr(13)))

    HTH

    Andy

    Originally posted by bpoulain
    The CR/LF characters are in as string which is in a column. How do you do to replace CR/LF by a space ?

Posting Permissions

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