Hi, On Dec 12, 2007 5:39 PM, mos <[EMAIL PROTECTED]> wrote: > I have a Char(50) column and I want to count the number of "." in the > column using a Select statement. I don't see any MySQL function that can > count the number of occurrences of a character in a string. Is there a > simple way to do this?
LENGTH(str) - LENGTH(REPLACE(str, '.', '')) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]