COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: barrysaab on 23 Oct 2011 11:08:18 AM

Title: Item Description and length
Post by: barrysaab on 23 Oct 2011 11:08:18 AM
 I have Item Description which is pretty long and it precedes by numbers like p3467909 i have to do two things here ,Firstly i have to get rid of number part of it, which is not of fixed length and secondly make it to only 90  length text, as  the item description is coming off in two lines in excel output  that is what pretty much we do. Any ideas Please?
My Item Descriptions is as below:

MAN-180X180--PROJECTION SCREEN 180X180 70"X70" WHITE WITH BLACK BORDER
GKR-667--GECKO AV STAND THREE TEMPERED CLEAR GLASS AND BLACK SAND METAL CABINET
CXCD235--COBY CD PORTABLE VERTICAL AM/FM
Title: Re: Item Description and length
Post by: Ras_MA on 23 Oct 2011 08:33:03 PM
Assumptions: the number and description are always separated by '--' and you're using a relationally modelled package.

Search for position of the separator string '--'.  Use this position plus 2 to find the beginning of the product description. An instring function can be used to limit the returned value to 90 characters.

The exact syntax required will depend on your database.