MySQL Forums
Forum List  »  Newbie

Re: Comparing strings
Posted by: Peter Brawley
Date: March 16, 2009 11:28AM

If firstname and lastname must be processed separately as you indicate, the first thing to do is change the table structure to put them into two columns, after which you can write ...

... WHERE LOCATE(firstname,lastname)) OR LOCATE(lastname,firstname) ...

If you don't do that, you will have to write a parsing function and call it eight times per row to extract firstnames & lastnames, or write one function which does all required comparisons.


Options: ReplyQuote

Written By
March 16, 2009 11:18AM
Re: Comparing strings
March 16, 2009 11:28AM
March 16, 2009 11:38AM
March 16, 2009 12:18PM
March 17, 2009 09:33AM
March 17, 2009 09:37AM
March 17, 2009 10:01AM
March 17, 2009 10:44AM
March 17, 2009 10:51AM
March 17, 2009 10:59AM
March 17, 2009 11:04AM
March 17, 2009 12:07PM

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.