[AccessD] Find String Containing Quotations

Drew Wutka DWUTKA at marlow.com
Wed Apr 23 16:19:39 CDT 2003


To represent a double quotes, you need to use two.

Thus, a string like this: "This symbol: "" is a quote."

That is 'seen' to the computer as:
This symbol: " is a quote.

Now, if you want a stand alone double quote, it get's wrapped on both ends
with double quotes, so this: """"

is seen as:

"

If you want to have a double quote at the beginning or the end of a string,
then it takes three.  (Two double quotes, and the beginning or end double
quote for the string).  So this:  """This sentence is wrapped in double
quotes.""" 

is seen as:

"This sentence is wrapped in double quotes."

So, to actually answer your question, you should have this: Like "*""*"

Which is seen as:
*"*

On a side note.  A single quote can also be used to 'wrap' a string.  So
'This is a string' is the same as "This is a string".  What is helpful in
this, is that a single quoted string can include a double quote as a normal
'character', just like a double qouted string can include a single quote as
a character.  Thus, 'This character, ", is a double quote.' is seen as:

This character, ", is a double quote.

Since the string 'delimiter' is a single qoute, the computer isn't confused
when it hits a double quote.  That's why this whole thing is the way it is
(boy that makes sense...<grin>).  The single and double quotes are text
'delimiters'.  A delimiter is what the computer uses to determine when
something starts and when it stops.  (like with recording data in a table,
Jet knows that a Long Integer is 4 bytes, so it knows automatically that
when it hits a long field, the first four bytes represent the data for that
field.  With a text field, the field is prefixed with one byte (which
represents 0 to 255), which tells Jet how many characters are in the text
field.  With strings, you need to tell the computer where to start and stop,
so a delimiter says 'hey, I'm the start, find the next one of me, and that's
the end'.  Works great until you need to use the delimiter within the string
itself.  There are all sorts of methods of getting around that...in VB's
case (and Jet), you use two in a row.  But there are other methods.  Like in
Front Page, it's navigation 'data' file uses a comma seperated format.  If
there is a comma in the field, it puts a / after it (or before it, don't
remember off hand).  

Sorry this got so long.....the answer you need is in the middle of this, but
hopefully I gave enough detail to help you in future endeavors! ;)

Drew
-----Original Message-----
From: Terri Jarus [mailto:jarus at amerinet-gpo.com]
Sent: Wednesday, April 23, 2003 3:43 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Find String Containing Quotations


I want to use a query to locate the records where the specified field
has quotation marks in it - but I don't know how to do that since you
have to use quotations around the string.

I tried Like "*"*" or Like "*'"'*", etc. but with no luck.  I know I
saw how to do this somewhere, but can't locate it.

Any help??

Thanks.
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list