View previous topic :: View next topic |
Author |
Message |
Gaurit Beginner
Joined: 05 Apr 2006 Posts: 2 Topics: 1
|
Posted: Mon May 08, 2006 9:44 am Post subject: count of records fulfilling certain criteria |
|
|
Hi,
I have a FB file which has the following data
AAAA 1
AAAA 1
AAAA 2
BBBB 1
BBBB 1
CCCC 1
I want the count of records for unique values of data.
The output for the above should be
AAAA 1 record count - 2
AAAA 2 record count - 1
BBBB 1 record count - 2
CCCC 1 record count - 1
All I need is the key and the record count. It does not matter how the record count is displayed as long as it is on the file along with the key. I need this for further processing. I was wondering if sort would help with this. The other way would be writing out a 1 for every record and then summing it up.
I came across Trailer1 = Count, but I am not aware if that will help me in this situation. I did try to look for something that would serve my purpose, but did not find anything.
Please let me know if there is some way out.
Thanks, _________________ Gauri |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
Gaurit Beginner
Joined: 05 Apr 2006 Posts: 2 Topics: 1
|
Posted: Mon May 08, 2006 1:35 pm Post subject: |
|
|
Kolusu,
I did search around but did not see this example. Thanks for pointing it out!
Thanks,
Gauri _________________ Gauri |
|
Back to top |
|
 |
|
|