Re: compare column value to anything in a list of values

2010-02-19 Thread Baron Schwartz
> [snip] > Is there a simple function or method to compare a value in a column to > one or more items in a comma separated list? > [/snip] Take a look at SUBSTRING_INDEX and related string functions. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

RE: compare column value to anything in a list of values

2010-02-17 Thread Jay Blanchard
[snip] IN('value1','value2') should work for exact matches, also works for integer values. [/snip] IN will not open and read his CSV file... [snip] Is there a simple function or method to compare a value in a column to one or more items in a comma separated list? [/snip] In order to do this you

Re: compare column value to anything in a list of values

2010-02-17 Thread Wm Mussatto
On Wed, February 17, 2010 09:24, Cantwell, Bryan wrote: > Is there a simple function or method to compare a value in a column to one > or more items in a comma separated list? > > select * from table where value > ('apple','orange','banana'); > > and say value may = something like > 'produce(grape

RE: compare column value to anything in a list of values

2010-02-17 Thread Cantwell, Bryan
..@optonline.net [dryd...@optonline.net] Sent: Wednesday, February 17, 2010 11:31 AM To: Cantwell, Bryan Subject: Re: compare column value to anything in a list of values yes, there is... IN SELECT * FROM tbl WHERE col IN ("v1", "v2", "v3") - Original Messag