Lingua2001 wrote:

How can I extract values for "members whose level is below '3', and
their names are between the alphabets 'a' and 'b' "?
For example, one of the results should be 'Alex', whose level is '1'.
Or 'Bob', whose level is '2'. But not Charlie, or Tom...etc.

I tried a query like

SELECT uid FROM members WHERE level > '1' AND name between 'a' and 'b',

but it does not work....

There's a problem with the condition on level, as George and Peter have noted, and also a more subtle one on name. Try "name between 'a' and 'bzzzzzzzzz' or something of the sort instead; 'Bob' > 'b' and just specifying the first letter won't work. Or, if you're worried about trailing z's or other high characters, try "name >= 'a' and name < 'c'".

Bruce Feist



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



Reply via email to