COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: gatorfe on 16 Jan 2012 01:00:48 PM

Title: Seperating Data in Field
Post by: gatorfe on 16 Jan 2012 01:00:48 PM
Hello, I have a product description field and I want to seperate the data in the field.  For example the product description may say "SWEW 732-04458.0180 X 0.187 X 111" and I want to take everything that is after the first period to show in its own field so in this case the output would be ".0180 X 0.187 X 111".  The number of characters in front of the first period varies. Thank you in advance for any suggestions!
Title: Re: Seperating Data in Field
Post by: HalfBloodPrince on 16 Jan 2012 11:41:06 PM
Try this out

substring('732-04458.0180 X 0.187 X 111',position('.','732-04458.0180 X 0.187 X 111'),char_length('732-04458.0180 X 0.187 X 111'))
Title: Re: Seperating Data in Field
Post by: barrysaab on 17 Jan 2012 03:47:09 AM
Thanks,HalfBloodPrince.
Title: Re: Seperating Data in Field
Post by: barrysaab on 17 Jan 2012 03:48:44 AM
Thanks,HalfBloodPrince.