Charles:
The select statement will have to be, once all substitutions are made,
like this:
SELECT XXXXX BY PART_NUM WITH PART_NUM LIKE '..."G2A"...'
The inner quotes are required in order to get an exact match on the
characters G2A anywhere in the part_num field.
Try this on the second line:
ECMD := \WITH PART_NUM LIKE '..."\ : SELCRIT : \"...'\
This makes use of the 3rd way to quote strings, the backslash. It
practically exists just for this purpose: to manipulate substrings that
themselves have single and double quotes in them.
Incidently - Do NOT use SSELECT, use just SELECT. The 'BY' clause will
make the sort happen. It's my understanding that using SSELECT pre-sorts
the file on @ID which is not at all what you want - it simply wastes
processing time.
Harold Oaks
Clark County IT
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Thursday, April 01, 2010 5:54 AM
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 related attachments and any response may be subject to public
disclosure under state law.
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users