COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: sg on 10 Jul 2009 09:49:59 AM

Title: Unable to use NOT LIKE Function
Post by: sg on 10 Jul 2009 09:49:59 AM
Hi ,

Ia m unable to use NOT LIKE Function. I have applied a filter

[PA_CUBE].[Bill To Customer].[Customer Name].[Customer Name] not like '%SIMPLEX%'

I want to eliminate all the records that starts with the customer name 'SIMPLEX'. I tried using caption keyword before the filter as the data source is a cube, but does not work.

It throws the error below:

Invalid coercion from 'level' to 'string' for '[PA_CUBE].[Bill To Customer].[Customer Name].[Customer Name]' in 'not ([PA_CUBE].[Bill To Customer].[Customer Name].[Customer Name] like '%SIMPLEX%')'.

Any help in this regard would be appreciated.

Thanks a lot.

sg
Title: Re: Unable to use NOT LIKE Function
Post by: Suraj on 10 Jul 2009 10:16:19 AM
use caption( around the cube element.
eg.
caption([pa_cube].[bill to....[].[])  not like ('%string%')

P.S. May need to add () around the string as well.
Title: Re: Unable to use NOT LIKE Function
Post by: sg on 12 Jul 2009 11:13:33 PM
Thank you for the reply. But ,
caption([pa_cube].[bill to...[].[]) not like ('%string%')

does not work . It throws an error an as:


RQP - DEF-0149
The query specification is incorrect.

Please let me know what to be done.

Thanks,.
Sg
Title: Re: Unable to use NOT LIKE Function
Post by: sg on 16 Jul 2009 06:18:36 AM
Thank  you very much for the reply. caption works fine.



Thanks,
sg