Skip to main content
Inspiring
January 15, 2009
Question

counting number of RFQ's each person has

  • January 15, 2009
  • 1 reply
  • 692 views
Hi. Hopefully this isn't too difficult. I have a field for RFQ Leader Initials. The table has lots of RFQ's in it and each RFQ has an RFQ Leader assigned to it. I would like to count how many RFQ's each person has assigned to them. I can get a total count of all the RFQ's that everyone in the database has by using this: #RFQLeaderSearch.RecordCount#, but I can't narrow it down to see how many each person has. On the first page, I have a checkbox list that a user can choose who they want to search for. On the action page, I just have a small table that outputs the RFQ Leader and the number of RFQ's each person has. Does anyone know how I can get this to work? I have attached the action page code. Can someone please help me? Thank you.
Andy
    This topic has been closed for replies.

    1 reply

    Inspiring
    January 15, 2009
    Are you familiar with selecting aggregates such as count using nothing but sql? If so, why do you not consider it applicable to this situation?

    If not, I've heard good things about the book, Teach Yourself SQL in 10 Minutes by Ben Forta.
    Inspiring
    January 15, 2009
    Dan,
    No, I'm not familiar with the count function. Is SQL the only way to make this work?

    Andy
    Inspiring
    January 15, 2009
    quote:

    Originally posted by: jamie61880
    Dan,
    No, I'm not familiar with the count function. Is SQL the only way to make this work?

    Andy

    There is never just one way to do anything. But using sql count() is the simplest and most efficient.