×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

I need help figuring out how to count instances

I need help figuring out how to count instances

I need help figuring out how to count instances

(OP)
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

RE: I need help figuring out how to count instances

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.

RE: I need help figuring out how to count instances

You can use a multiple verb request:

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
http://www.explicit.nl

RE: I need help figuring out how to count instances

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close