The final string needs to read as LIKE "0X'G2A'0X", so the string the
user supplies is always single quoted.

In code it would be something like this

QUOTE = '"'
USER.STRING = QUOTE:"0X'":SELCRIT:"'0X":QUOTE
ECMD := " WITH PART_NUM LIKE ":USER.STRING

Ed

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: 01 April 2010 13:54
To: U2 Users List
Subject: [U2] SELECT Statement question

Here's an odd thing,  I have an app that allows the user to pass in a 
select criteria string that is used to find a string containing the
select 
criteria.  Like this.

ECMD = "SSELECT ":CP:" BY PART_NUM"
IF SELCRIT <> '' THEN
        ECMD := " WITH PART_NUM LIKE '...":SELCRIT:"...'" 
END
EXECUTE ECMD

This works fine most of the time, but we just noticed that when the
select 
criteria is G2A, it takes that to mean a G followed with 2 alpha 
characters, so it matches many more items than desired.  Is there a way
to 
force the SELECT to take the criteria as a literal G2A and not as a 
matching pattern?
 

Charles Shaffer
Senior Analyst
NTN-Bower Corporation
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

-------------------------------------------------------------------------------------------
This e-mail and any attachment(s), is confidential and may be legally 
privileged. It is intended solely for the addressee. If you are not the 
addressee, dissemination, copying or use of this e-mail or any of its content 
is prohibited and may be unlawful. If you are not the intended recipient please 
inform the sender immediately and destroy the e-mail, any attachment(s) and any 
copies. All liability for viruses is excluded to the fullest extent permitted 
by law. It is your responsibility to scan or otherwise check this email and any 
attachment(s). Unless otherwise stated (i) views expressed in this message are 
those of the individual sender (ii) no contract may be construed by this 
e-mail. Emails may be monitored and you are taken to consent to this 
monitoring.  

Civica Services Limited, Company No. 02374268; Civica UK Limited, Company No. 
01628868
Both companies are registered in England and Wales and each has its registered 
office at 2 Burston Road, Putney, London, SW15 6AR.
-------------------------------------------------------------------------------------------

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to