Contact US

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!

*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

AS400 combineing results work query

AS400 combineing results work query

AS400 combineing results work query

I'm trying to get a query to list results, but combine and count them.  Meaning if a result is "Virginia" and it pops up 4 times, it lists "Virginia" once with a count of 4 under it.  This is what I'm getting.

0000001        Virginia
0000002        Virginia
0000003        Virginia
0000004 COUNT 3

What I would like to get is:
0000001        Virginia
0000002 COUNT 3

Anyone have any pointers?

RE: AS400 combineing results work query

What query product are you using?

RE: AS400 combineing results work query

what you want is summary info, not detail and summary,, then in your total line,, you want to specify not only count on the field you also, want oh say min, or avg. Since they are all the same,, you will get the desired results. I am assuming you are using the IBM QRY..It looks like you are..


RE: AS400 combineing results work query

Yes, ibm query.
ok, that is doing what I want, how do I tell it just summery?

RE: AS400 combineing results work query

I think I got it.  It was under out type.  Select summery only instead of detail.  Yep, works.  Thanks

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! Already a Member? Login

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