Keith writes: >i'm looking for a way to do two BETWEEN ranges. Currently I have >sys.sectorID BETWEEN 1 AND 20 but I want it so that I can search >between 1 and 20 and also between 30 and 42 but all my efforts net >an error and the manual doesn't go into a lot of detail. If there's >a faster way than BETWEEN then
BETWEEN can be accomplished with <= coupled with 'and'. Using your examples: SELECT sys.sectorID from sys where (1 <= sys.sectorID and sys.sectorID <= 20) or (30 <= sys.sectorID and sys.sectorID <= 42) ; Brad Eacker ([EMAIL PROTECTED]) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]