In
this article I am going to explain how to count number of words in column using
sql server.
In
previous article I have explained how to display image in Angular UI-Grid, howto add auto increment serial number column in RDLC report and how to changetext using CSS.
Implementation:
I
want to count the number of words in a column. Run the below given query to get
total number of words:
DECLARE @words VARCHAR(250)
SET @words = 'article mirror, asp.net, sql server'
SELECT LEN(@words) - LEN(REPLACE(@words, ' ', '')) + 1 as 'total number of words'
Result:
S.No.
|
Total number of words
|
1
|
5
|
No comments:
Post a Comment