Print Page | Close Window

Double quotation marks in the data

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=7757
Printed Date: 27 Apr 2024 at 6:06am


Topic: Double quotation marks in the data
Posted By: joverdorff
Subject: Double quotation marks in the data
Date Posted: 21 Sep 2009 at 12:08pm
I have data in certain fields that has double quotation marks around it. I need to use the instr function to find stuff, but some of the data is partially duplicated.

Here's an example of what I'm talking about.

data thingy 1 is "MyName" = John
more data
more data
some more data
data thingy 2 is "Name" = That Tune

I want the data after "Name" and NOT the data after "MyName"

I've tried telling instr to start after x amount of characters to look for "Name", but the problem is, there is no set amount (or even close) of characters to start at.

Ultimately what I need is a way to use instr to search for ""Name"" and not just "Name"

Any ideas?

Thanks in advance.



Replies:
Posted By: DBlank
Date Posted: 21 Sep 2009 at 12:43pm
try and put single quotes aroun d the inner double quotes and search by that...
instr( mailto:%7b@quote%7d,"Double - fieldtosearch,'"Name"' )


Posted By: joverdorff
Date Posted: 21 Sep 2009 at 12:49pm
Holy cow! Well, that was easy (not to mention it works perfectly)!

THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Posted By: DBlank
Date Posted: 21 Sep 2009 at 12:55pm
No prob.
The inverse process works if you find you require a search for something with an apostrophe like say Jay's....
instr(field,"Jay's")



Print Page | Close Window