On Tue, 20 Jan 2004, Chris Boget wrote: > The data I'm working with looks like this: > > table1.columnA = '1;3;4;6;8;9;12;13;14;15'; > > table2.columnA = '3'; > table2.columnB = 'this'; > > I need to write a query that will do something along these lines: > > SELECT * FROM table1, table2 WHERE > table2.columnB = 'this' > AND > table1.columnA LIKE CONCAT( '%', table2.columnA, '%' ); >
AND INSTR(table1.columnA, table2.columnA) You can find more info about the INSTR function at: http://www.mysql.com/doc/en/String_functions.html#IDX1189 cheers, Tobias -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
