1 Reply Latest reply on Nov 25, 2009 9:33 AM by JoeBidgood

    ePO 3.61 container count query

      All, has anyone built a query to count how many objects are in a particular container? I need to have an automated count of objects in an ePO container. Would love not to re-invent the wheel .





      Message was edited by: larryl9797 on 11/24/09 10:08 AM
        • 1. Re: ePO 3.61 container count query



          Assuming we're talking about count of computers in sites or groups, then you could try this:


          SELECT b.NodeName as 'Container', count(l.Autoid) as 'Count' FROM LeafNode l JOIN BranchNode b on (l.Autoid = b.Parentid)

          WHERE b.Type in (3,4,5) AND l.Type = 1

          GROUP BY b.NodeName


          That should do it...


          Regards -