OK - I see the problem.

True, it will not work the way it is, but there might be a work around.  If the 
string we are looking for could contain both single and double quotes, we are 
out of luck with the standard way of searching.

However, we could write a simple I-desc that calls a program which would return 
a value where the quotes are replaces with some "odd" character (like a tilda 
or some non-printing character).  Then have the program tweaked to select on 
the I-desc looking for these "odd" characters.

For example:
Raw data = LLOYD'S
I-desc = LLOYD~S

Now, instead of:
  SELECT FILE WITH FIELD LIKE "...LLOYD'S..."
We would do:
  SELECT FILE WITH I-desc LIKE "...LLOYD~S..."

This is not as fancy as you would likely need, but it shows the concept of 
something that should work.

I have also had situations where I needed to determine a non-standard 
delimiter.  To do this, I would build a string of potential characters like:
  DELIMITERS = "[EMAIL PROTECTED]&*()_+{}[]\|:;<>?"
I would then loop through each of the characters in DELIMITER attempting to 
find a character that was NOT found in the target string.  Once I find one, 
that character is stored in some fashion and used to encrypt/decrypt as needed.

Hopefully, between these two ideas you can get pointed in a useful direction.


John Israel
Sr. Programmer/Analyst
Dayton Superior Corporation
721 Richard St.
Dayton, OH  45342
937-866-0711 x44380

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anthony W. 
Youngman
Sent: Wednesday, August 06, 2008 7:26 PM
To: [email protected]
Subject: Re: [U2] RE: SELECT problem with quote characters

In message
<[EMAIL PROTECTED]>,
"Israel, John R." <[EMAIL PROTECTED]> writes
>You need the double quotes on the outside of the ...
>
>SELECT FILE WITH FIELD LIKE "...LLOYD'S..."
>
>Alternatively, you can often get away with no quotes.  Loosely
>speaking, you only NEED quotes on the outside if you have spaces in
>your search string, though if you have a single quote in your search
>string, that would likely confuse it.
>
The problem is, this is a program constructing a select string. I have
no control over what the user types in, and I want to do a literal
match. What if they enter something like "6A'S"?

Basically, I need to quote the search string to get a literal match,
which means I need to put quotes outside the dots, which means I need to
use all three different quote characters, which then doesn't work :-(

Cheers,
Wol
--
Anthony W. Youngman <[EMAIL PROTECTED]>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to