> 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 ,
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.
--
-
Scott HanedaTel: 415.898.2602
<http://w
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 na
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 COUNT(name)>1
I am aware that such a query is bogus but it seems as if there must
be a straightforward way of doing this.
tha