MySQL Forums
Forum List  »  InnoDB

Re: Challenge for the brave.. common string in group query
Posted by: Brian Papantonio
Date: July 08, 2008 08:46PM

The fact that you need this done is indicitive of a database design probem. Are you oversimplifying your problem?

I suppose it could be done using a stored procedure which figures out the maximum number of characters there could be. Then some weird combination of LEFT() and GROUP BY/COUNT(*) to find the leftmost strings that are all counted the most number of times. The highest one of those tells you the number of characters that were found to be identical.

-----------------------
MySQL 5.0 Certified DBA
MySQL 5.0 Certified Developer

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Challenge for the brave.. common string in group query
1837
July 08, 2008 08:46PM


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.