This should work for you:

SELECT * FROM sometable WHERE surname BETWEEN 'A' AND 'D' ORDER BY surname

In my quick test the first parameter is inclusive while the second is not, which is why it is D and not C.

On Thursday, October 30, 2003, at 02:22 PM, Scott Brown wrote:

I want to do a string comparison like this:


SELECT * FROM sometable WHERE surname LIKE '[A-C]%' ORDER BY surname;


--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to