MySQL Forums
Forum List  »  Newbie

Re: Pattern matching problem
Posted by: Chad Bourque
Date: September 02, 2010 02:33PM


You would be much better off to redesign your table. You can probably get the data you are looking for using RLIKE and regular expressions. Or something like this:

select *
  from tblName
  where colName like '%,T,%';

But that requires you to drop the spaces and make sure to start and end your list with commas. Save yourself many future headaches and just design your table properly now.


Options: ReplyQuote

Written By
September 02, 2010 01:11PM
Re: Pattern matching problem
September 02, 2010 02:33PM
September 02, 2010 02:46PM
September 02, 2010 03:10PM
September 02, 2010 04:24PM
September 02, 2010 08:55PM
September 03, 2010 08:37AM
September 07, 2010 03:25PM
September 07, 2010 04:39PM
September 07, 2010 06:13PM
September 07, 2010 07:08PM

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.