Informix SQL ?
Posted in 1993
Please respond via email. . .and thanks in advance.
=============================================================================
We are trying to do some wildcarding using a MATCHES statement, however
we are running into a problem.
A sample table is created:
TABLE NAME: table_name
COLUMN NAME: column_name CHAR(10)
The previous table is then populated with the following entries:
COLUMN NAME: column_name
========================
xyz1
xyz2
xyz3
xyz7
xyz10
xyz11
You can select using the MATCHES clause:
SELECT * FROM table_name WHERE column_name MATCHES "xyz[127]"
The previous will select the "xyz1", "xyz2" and "xyz7" entries.
But what if you want to select "xyz2" and "xyz10". Using MATCHES
"xyz[21][0]" will not work because only the "xyz10" entry will be
selected. Using MATCHES "xyz[21]*" will not work because this will
select "xyz2", "xyz10" and "xyz11".
I realize that changing the query would allow me to do the above. But, I
wanted to find out if there was some method using the above query with the
MATCHES clause and a set of wildcarding expressions. Principally because
the data is being acquired thru an ACE INPUT statement. My experience tells
me there is no way of doing this, but I wanted to make sure.
Brad Knotwell bpk@evolving.com
Evolving Systems, Inc.
Denver, CO