Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

search and replace a string

Hi

  I have a couple of varchar columns with values separated by commas. I would want to remove any spaces around the commas and need to place the independent values in single quotes.

2 objectives

  • need to remove any spaces (one or more) around the comma. Only around the comma and I dont want to replace the spaces otherwise.
  • Need to place the values separated by comma in single quotes

Example

Input

Column A     Column B

John               Tim  ,  Tom

Dany               112, 118

Jenny              In Town

Output

Column A     Column B

John               'Tim','Tom'

Dany               '112','118'

Jenny              In Town

Am using BODS designer version 14.2.2

Cheers!

Tags:

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question