Jump to content
Server Maintenance This Week. ×

Count number of times text in single field


This topic is 6558 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a single field that contains a lot of text (its an output log from a computer system)

I want to set up a database that has several tables:

1 - output log (single field)

2 - table of lookup values (the actual text to count up in the log, and the part number that output refers to)

3 - Final list of part numbers and count of them

I want to do a loop for the table of lookup values - starting at the top - look for the specified text in the output log, and count up the number of times that text occurs in the log, if not move on to next part number

how would i do this?

Edited by Guest
Link to comment
Share on other sites

The PatternCount function will tell you how many times a given string appears in another.

What I'd try is to create a calculation field in your lookup table:

_c_TermCount (number):)

PatternCount(Log::LogText; LookUpTerm)

[Log is your logfile name; LogText is the field with the log text in it; LookUpTerm is the field in the lookup table that has the term in it]

Now, place _c_TermCount and LookUpTerm on a list layout for the Lookup table. It should give you a summary of your lookup terms and their counts.

HTH,

David

Link to comment
Share on other sites

This topic is 6558 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.