G
Guest
I am trying to query for last names that begin with a through l.....is there
a way to do that? thanks
a way to do that? thanks
JRS said:I am trying to query for last names that begin with a through l.....is
there
a way to do that? thanks
Douglas said:In addition to the solutions already suggested, you should be able to simply
specify < "m" as the criteria for the last name.
Jamie Collins said:In addition to the solutions already suggested, you should be able to
simply
specify < "m" as the criteria for the last name.
That ain't necessarily so. Using a Sequence table of integers:
CREATE TABLE Test7 (
testcol VARCHAR(1) NOT NULL
)
;
INSERT INTO Test7 (testcol)
SELECT CHR(seq)
FROM Sequence
WHERE seq BETWEEN 1 AND 255
;
The following query returns 26 rows:
SELECT testcol
FROM Test7
WHERE (testcol LIKE '[A-L]*' OR testcol LIKE '[A-L]%');
whereas the following query returns 190 rows:
SELECT testcol
FROM Test7
WHERE testcol < 'm'
;
Jamie.