COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: BIsrik on 03 Jul 2009 07:51:35 AM

Title: DataType Imported in FM
Post by: BIsrik on 03 Jul 2009 07:51:35 AM
Hi,

I have imported a product table in model. The product table contains product id and product name. The product name column is of varchar(100) datatype in the table definition. When imported in FM, data type is shown as character with precision as 100.

When viewed in cognos viewer, the product name values are added with extra spaces, so that the total length of the value displayed is 100.

Please help in solving this.

Srik
Title: Re: DataType Imported in FM
Post by: DustPanMan on 06 Jul 2009 10:17:33 AM
Srik,

Is the datatype greyed out so that you can't change it back to a vchar?

Best regards,

Dustin
Title: Re: DataType Imported in FM
Post by: BIsrik on 10 Jul 2009 01:18:06 AM
Yes, this grey out and i am not able to change to any other datatype.

Srik
Title: Re: DataType Imported in FM
Post by: kart78 on 10 Jul 2009 01:41:10 AM
You could use Trim function to remove Trailing spaces.
Title: Re: DataType Imported in FM
Post by: BIsrik on 10 Jul 2009 05:59:43 AM
I had tried doing that but noticed that the trim function is filtering some records... ???

Srik
Title: Re: DataType Imported in FM
Post by: kart78 on 13 Jul 2009 05:29:03 AM
http://www.itjungle.com/fhg/fhg101106-story02.html
Title: Re: DataType Imported in FM
Post by: Gopinath on 13 Jul 2009 05:48:25 AM
Try

TRIM( CAST( [Data Item] as varchar(100)))