Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get number of words in a sql server field
Message
De
11/10/2007 09:14:31
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01260240
Message ID:
01260248
Vues:
11
Perfect! Thanks Sergey :o)


>>I would like to determine the number of words in a field in a sql server table. Is there an easy way to do it? I really just need to know if there is more than one word in a field.
>
>Tracy,
>
>Assuming that words are separated by spaces and there are no leading spaces
>
>LEN(mycolumn) <> LEN(REPLACE(mycolumn, SPACE(1), SPACE(0)))
>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform