If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Filter on words with apostrophes

Started by stanleytheyak, 19 Dec 2013 11:35:12 AM

Previous topic - Next topic

stanleytheyak

I can't seem to find an answer on this anywhere.  I'm doing a filter that says [Activities].[Notes] contains 'didn't' (along with some other keywords).  Usually, if I were to filter on a word like "didn't", I would enter 'didn''t' and that would work.  What Cognos seems to be doing is returning anything that has 'didn' and 't' instead of 'didn't'.  What is the key to including words with apostrophes in Cognos?

Any help here would be GREATLY appreciated.

MFGF

Hi,

This might seem counter-intuitive, but have you tried using four single quotes (ie '''')

This is a single quote in single quotes with a single quote preceding it to act as an escape character...

I haven't tried it but it would be quick for you to test.

If it doesn't work, you will inderstand why everyone refers to me as the Cognos muppet :)

MF.
Meep!

stanleytheyak

I've tried it as [Activities].[Notes]contains 'Didn''''t' and it returns nothing (I know there are notes that contain "didn't" because I put them there).

I've also tried it as [Activities].[Notes].[Comments]contains 'Didn'''''t', thinking I'd need the fifth ' to include the t at the end.  I get this error:

QE-DEF-0459 CCLException
QE-DEF-0260 Parsing error before or near position 52 of: [Activities].[Notes].[Comments]contains 'Didn'''''t'
QE-DEF-0261 QFWP - Parsing text: [Activities].[Notes].[Comments]contains 'Didn'''''t'

Lynn

You already have single quotes surrounding the string, so you should just need two single quotes within. One to represent the quote you are searching for and one preceding it as an escape character.

Try this:

[Activities].[Notes].[Comments]contains 'Didn''t'

CogFanGal