Re: MINUS in MySQL (was Re: Thanks!) -- also intesection with LIKE?

From: Ken Irwin <kirwin_at_nyob>
Date: Fri, 26 Jan 2007 13:31:33 -0500
To: CODE4LIB_at_listserv.nd.edu
Jonathan Gorman wrote:
> I think what's Ken is asking for though is there some combination of the
> IN operator and LIKE operator.  He's trying to exclude a set of patterns,
> ie converting (ip NOT LIKE "127.%" OR ip NOT LIKE "143.123.%").
yup - that's exactly what i'm trying to do.
> say much), but if by some stroke of luck you filter based on a certain
> part of the address you could do a substring function.
>
> SELECT *  FROM iptables
> WHERE substring(iptables,1,7) NOT IN (127.475,...)
sadly, my data isn't quite regular enough for that. it could simply be
that MySQL isn't built to handle this kind of query.

thanks
Ken

--
Ken Irwin
Reference Librarian
Thomas Library, Wittenberg University
Received on Fri Jan 26 2007 - 13:09:02 EST