2 Replies Latest reply on Mar 11, 2014 10:15 AM by alexslv

    SQL Query To Return All Members With Problems From Multiple Groups

    alexslv

      Hi All,

       

      Would anyone please help me to design an SQL query to return all members of specific group. Some of my groups have different object types and some have dynamic queries. I would like to be able to see everything what goes into the group. Pretty much exactly the same as "All Group Members" resource on the group page

       

      [UPDATE]

      Actually, if anyone can provide me with an SQL query which will return objects exactly as in "Group Members With Problems" group resource - that would be great. This is what I want to achieve in first place. Resource on page is good, but I need report for multiple groups

       

      Thank you,

      Alex

        • Re: SQL Query To Return All Members Of Specific Group
          zackm
          SELECT
            Containers_AlertsAndReportsData.GroupName AS Group_Name,
            Containers_AlertsAndReportsData.GroupStatusDescription AS Group_Status,
            Containers_AlertsAndReportsData.GroupPercentAvailability AS Group_Availability,
            Containers_AlertsAndReportsData.GroupMemberName AS Group_Member_Name,
            Containers_AlertsAndReportsData.GroupMemberStatusDescription AS Group_Member_Status,
            Containers_AlertsAndReportsData.GroupMemberPercentAvailability AS Group_Member_Availability
          FROM Containers_AlertsAndReportsData
          WHERE Containers_AlertsAndReportsData.GroupStatusDescription != 'Up'
          
            • Re: SQL Query To Return All Members Of Specific Group
              alexslv

              zackm, thanks a million. This is exactly what I needed. I have slightly modified WHERE statement, to exclude up, unknown and unmanaged members:

               

              WHERE

                Containers_AlertsAndReportsData.GroupMemberStatusDescription != 'Up'

                AND Containers_AlertsAndReportsData.GroupMemberStatusDescription != 'Unknown'

                AND Containers_AlertsAndReportsData.GroupMemberStatusDescription != 'Unmanaged'

              1 of 1 people found this helpful