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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count instances of string w/in a field 1

Status
Not open for further replies.

Buckaroo8

Programmer
Aug 6, 2003
27
US
Hello All,
I have a stored procedure which outputs two strings in a field on my report:
string 1 = "Acute Medical"
string 2 = "Behavioral Mngmt"

So I need to total the number of instances of both (done).

However, how do I total/count each individually:
"Acute Medical" = XX (times occurred)
"Behaviroal Mngmt" = XX (times occurred)
Total = XX (done)

Thanks for everyone's help!
 
2 strings in a single field, or one of the 2 strings will be in a field?

Or???

Anyway, a simple means would be to use the instr() function to find if a string exists within another string:

instr("Acute Medical",{table.field}) > 0

So create a Running Total for each field and in the evaluate->use a formula place the above.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top