Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to count the number of times a word occurs in a field...

Status
Not open for further replies.

rbasram

Programmer
Sep 27, 2001
53
0
0
CA
I have a field named HISTORY(Type Text) in the table TIP. Is there a query that can count the number of times the word "VALIDATED" occurs in this field and give only the records that have only count=1 (i.e VALIDATED occurs only once)

Any suggestions will be appreciated..

Thank-you
 

rsoor,

I would create a function (you could call it StrFound) that would return the number of times the text string occurs. You could use the function within the query (in design view it would be Expr1: StrFound([HISTORY],"Validated")) and have a where clause in your SQL statement that would look for values of 1 (e.g, "WHERE Expr1 = 1").

HTH,
GGleason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top