COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: andoid95 on 10 Jun 2014 06:01:37 AM

Title: Remove single quote
Post by: andoid95 on 10 Jun 2014 06:01:37 AM
Hello,

I have one column in list Report Name [path]. When I run Report [path] show me

1. content/folder[@name='HK loc report']/folder[@name='Russia']/report[@name='rep' ]
2. content/folder[@name='HK local report']/folder[@name='Russia']/folder[@name='Mosc ou'/report[@name='rep']

Now I want to replace this single quote (') by ('') in path because I want to use the replace function after.
Title: Re: Remove single quote
Post by: bdbits on 10 Jun 2014 11:32:40 AM
I think the replace function would work (depending on database vendor as it is not a native function). You have to double up the quotes in the strings, so it looks a little odd. Try this:

replace([path],'''', '''''')