COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: berks321 on 05 Jan 2016 11:03:09 AM

Title: String Manipulation For Quotes
Post by: berks321 on 05 Jan 2016 11:03:09 AM
I have a data item with a string of text that can look like this:
6000 Sales Beijing (ABCDE) ( 6000) Sales Beijing EUR
It could also look like this:
(ABCDE, ABCDF) ( 6000, 6001) Sales China EUR

I want to trim so that I only have the codes from the string (note that there is a space after the open bracket and a double space after the close bracket) e.g.
6000
Or:
6000,6001

And I then want to add quotes around each code e.g.
'6000'
Or
'6000','6001'

Can anyone help me?
Title: Re: String Manipulation For Quotes
Post by: bdbits on 05 Jan 2016 06:06:25 PM
You should get this fixed in ETL, ideally by pulling out the codes and putting them in additional attribute(s).