Re: word count

2005-04-08 Thread Jigal van Hemert
> Is there a simple wat to get a word count out of a field in mysql, or to at > least split on " " and tell me how many items in that array. Well, you can count the number of spaces: SET @str = 'A four word sentence'; SELECT LENGTH( @str ) - LENGTH( REPLACE ( @str , ' ', '' ) ) +1; Maybe this is

Re: word count

2001-07-09 Thread j.urban
How about: select position(' ' IN name) as fs from contacts having fs>0; On Mon, 9 Jul 2001, Tommy Beavitt wrote: > How do I build an SQL query which returns rows based on whether or > not strings in a column contain more than one word > > eg. > > SELECT name > FROM contacts > WHERE WORD CO