question

ItsMeSri avatar image
ItsMeSri asked

Find word count in the database or tables?

How should I find word count in given database or in tables and return table name and count ? Do we have easy way to find this?
sql-server-2008sqlt-sql
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
How to you define a word? I'm thinking that there could be many strings of characters in a database that aren't actually words and wonder what your rule is for telling them apart from "real" words. If you have multiple "words" in a single column, do you want to use anything besides a single space to delimit them? Do you want to look at certain column for the words, or is every character-based column in the database subject to the count and what about system tables?
3 Likes 3 ·

1 Answer

·
askmlx121 avatar image
askmlx121 answered
use length() function, charindex and patindex() function in sql
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.