Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace Function for Apostrophe character in the Report.net

Status
Not open for further replies.

Rosti

Programmer
Mar 5, 2002
46
US
Hello all,
I am using report.net v8.2

When I am using replace function to remove ' character (apostrophe)it give me an error:

replace([Staff Last Name - MS], ''', 'another_string')

Please help!
Thank you!
 
Did you try:

replace([Staff Last Name - MS], "'", 'another_string')

Ties Blom

 
Hello. Yes, double qoutes (") are not accepted in the Report.net
 
Hello,
good news - just found the answer - I need to use 4 single qoutes to find apostrophe:
replace([Staff Last Name - MS], '''', 'another_string')
It works!
Thank you!
 
V8.2? Your are aware that this is Cognos8 and not ReportNet?

Ties Blom

 
Yes. We are using 8.2 and 8.4, so sometimes I am confused. Thank you.
 
Well, neither is ReportNet, which should be conclusive.. :)

Ties Blom

 
I have a problem similar to this. We just upgraded to Cognos 8.4.1 and this worked before in Cognos 8.1 MR 2. I want to select all names that don't contain an apostrophe. This is in my filter:

[Business View].[Constituent Person View].[ADDRESS_NAME] not like ''''

When I try to validate the report it just sits at the Validate with Report Server window with the hourglass spinning and never validates. If I run the report it never finishes.

Is there a different way to do this now? Thanks in advance for your help!
 
Code:
[Business View].[Constituent Person View].[ADDRESS_NAME] =
replace([Business View].[Constituent Person View].[ADDRESS_NAME],'''','_')

assuming you use SQL server and have enabled vendor specific functions..

Ties Blom

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top