Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2006
    Posts
    1

    Unanswered: Procedure to replace Single Character in a String

    Has anyone created a DB2 procedure or UDF that can Replace a character or characters in the middle of a Character String Column? If so, could you email me the code? Thanks, Rachel

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Have you looked at the REPLACE built in function?

    Andy

  3. #3
    Join Date
    Dec 2005
    Posts
    18
    Are you not familiar with REPLACE scalar function ?

    http://publib.boulder.ibm.com/infoce...n/r0000843.htm

  4. #4
    Join Date
    Feb 2006
    Location
    Utrecht, Netherlands
    Posts
    16
    Quote Originally Posted by RGAUGHRAN
    Has anyone created a DB2 procedure or UDF that can Replace a character or characters in the middle of a Character String Column? If so, could you email me the code? Thanks, Rachel
    Try this:
    db2 values translate ('I wqnt q rxplqcxmxnt', 'ea', 'xq')
    and tell me if it is what you want...

    cheers,
    Rob.

Posting Permissions

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