On Monday, Oct 14, 2002, at 13:29 America/Phoenix, Tim Kerch wrote:

> For example, I have a string
> "Administration,Advertising,Direction,Media,Research" and I want to see
> whether a SECTOR field in a row is contained in the above string.
>
> so that I can select rows which contain only "Advertising" in their 
> SECTOR field.. sort of like a reverse LIKE, whether a field is 
> contained in a string I supply to MySQL.
>
> Is there a way to do it without splitting the above string and 
> checking for each sector specifically?
>

For each field you could do

SELECT field_name from your_table where SECTOR LIKE '%field_name%' .

You don't care what the result is.  Only that there is a result with at 
least one row of data.
--
Clayburn W. Juniel, III
Phone: (602) 326-7707
Email: [EMAIL PROTECTED]
http://EffectiveSoftwareSolutions.com
--


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to