![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I found some code for generating a list of the number of occurrences of a word in a Word document. http://word.tips.net/T000879_Determi...Frequency.html I'd like to do the same for fields in a table. |
#3
| |||
| |||
|
|
I found some code for generating a list of the number of occurrences of a word in a Word document. http://word.tips.net/T000879_Determi...Frequency.html I'd like to do the same for fields in a table. This is not really a task that sql (I'm talking about the language) is |
#4
| |||
| |||
|
|
I found some code for generating a list of the number of occurrences of a word in a Word document.http://word.tips.net/T000879_Determi...Frequency.html I'd like to do the same for fields in a table. W. Pooh (AKA Winnie P.) |
#5
| |||
| |||
|
|
Christopher M. wrote: I found some code for generating a list of the number of occurrences of a word in a Word document. http://word.tips.net/T000879_Determi...Frequency.html I'd like to do the same for fields in a table. This is not really a task that sql (I'm talking about the language) is suited for, especially JetSQL, at least, on its own. One problem is identifying when a sequence of characters is actually a word. Some patterns might be: a number of characters - surrounded by spaces - space in front and end-of-line character after, or vice versa - with a space in front and a punctuation mark after or vice versa - if storing html, then you have to worry about tags - combinations of the above Some problems might be: - hyphenated words: two separate words or a single word? Depending on how many of the above patterns you have to deal with, you will likely need to resort to creating a VBA function to do the actual counting of the specified word in a passed string, perhaps using regular expressions. Then use the function in a grouping query like this: select SUM(WordCount("word", [Field1]) + WordCount("word", [Field2]) As Occurrences FROM tablename I've never had an occasion to write such a function so this is the extent of the help I can offer. |
![]() |
| Thread Tools | |
| Display Modes | |
| |