[Gllug] OT: SQL counting regex matches within a field

Sean Burlington sean at uncertainty.org.uk
Thu Jul 3 21:20:45 UTC 2003


Ian Norton wrote:
> Hi folks,
> 
> does anyone know how to cound the number of times a match occurs within a
> field in mysql?
> 
> my only working method involves iterating through every field using perl and
> counting the regex matches, i dont want to have to do that really :-/
> 
> Ian
> 

select count(some_non_null_column) from data where condition = 1;

-- 

Sean


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list