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

I need help figuring out how to count instances

Status
Not open for further replies.

phmacomber

Technical User
Apr 22, 2002
2
US
This seems like it should be pretty simple but I am struggling.

I am building a table that will show the name of an application and the table that it is related to. I also need a column that counts the number of tables used by each application.

Example:
APPLICATION TABLES COUNT
Application 1 table 1
table 2
table 3
3
Application 2 table 1
table 3
table 4
table 5
4
etc.

I just can not seem to get the count column to turn out correctly. It seems to be counting something else like fields within the tables. I would greatly appreciate any guidance someone could provide.

Thanks,
Phil
 
Have you tried using an operator such as fst. ? Are you using "Table File Count"?

I would love to help - my email is michele@heavenandearthdesigns.com if you need anything further.
 
You can use a multiple verb request:
Code:
TABLE FILE filename
  COUNT TABLES
     BY APPLICATION
  PRINT TABLES
     BY APPLICATION
END
This request sorts the tuples by application and prints the table-names. On the same sort-break it counts the different tables.

By the way: Take care with these field-names. Focus can get confused when you name a field TABLE. Frank van de Kant
 
Thanks everyone for your responses to my question!!

I finally figured out what was going on. I had been working in Developer Studio (DS) and then jumped out to edit the code. At some point DS put a line of code "ON TABLE NOTOTAL" that the minute I commented it out the totals worked fine. That code was hidden within some TABLE SET lines of code.

Now my last task is to sort on this field that I created. If you are interested in seeing the code for this I can email it to you but I won't post it here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top