MySQL Forums
Forum List  »  Newbie

Re: LIKE compare two columns
Posted by: Laurence Leach
Date: February 03, 2006 08:56AM

OK, i figured out the problem myself!!!

You can use the function INSTR( ) (in string)

Like this...

(SELECT COUNT( * ) FROM issues WHERE INSTR(product, project)) AS issues

This will return a valid row for every occurence where the value for project occurs ANYWHERE in the string product. Sorted!!! Didn't even realise this function existed, and i tried a LOT of other methods, but finally one that works!!!

Hope this helps someone else!

Options: ReplyQuote


Subject
Written By
Posted
February 03, 2006 07:13AM
Re: LIKE compare two columns
February 03, 2006 08:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.