hi
Is there any function , which works like replace in expression
Thansk
replace("old substring", "your original string", "new substring")
Example:
replace("ello", "Hello world", "i") returns:
"Hi world"
i cant use replace function in cognos expression,i need to find similar function which i can use
Can't use the replace function? That's weird. As far as I know, it's the only easy way to do it. Are you sure the parameters passed to the function are all Strings?
yes they all r string
Functions available to you and their syntax can sometimes vary depending on the database you are using.
If you post what DBMS you are reporting against, it may help you get better responses to your question.
Some databases have a "translate" function that may help you achieve something similar to "replace".
i am using sql server , but there is no function in expression replace
Quote from: div_1234 on 31 Aug 2011 03:54:01 PM
i am using sql server , but there is no function in expression replace
I'm not using SQL Server currently, but I'm pretty sure that it supports the replace function:
http://msdn.microsoft.com/en-us/library/ms186862.aspx
I don't understand what you mean when you say you can't use it? Did you try and get an error? Just because you don't see it listed in the functions tab on the expression editor doesn't mean you can't use it (in case that is the issue).
hi
i am getting error like the function name was not found near the position 80. CRX-API-0011