6 Replies Latest reply on Mar 17, 2015 2:43 PM by lcoursy

    Query ?

    lcoursy

      I wonder if someone can point out what and where the problem/s in my query are. I am trying to display properties from the node where they belong in a certain group.

       

      SELECT Caption, EM_Server_Level, IP_Address FROM Nodes

      LEFT JOIN Containers ON (Containers.ContainerID=ContainerMemberSnapshots.ContainerID)

      LEFT JOIN ContainerMemberSnapshots ON (ContainerMemberSnapshots.Name=Nodes.Caption)

      WHERE Containers.Name = 'WMASS'

      ORDER BY Nodes.Caption DESC;

       

       

       

      Help me please,

      Lance

        • Re: Query ?
          bluefunelemental

          flip the order of these two

          LEFT JOIN Containers ON (Containers.ContainerID=ContainerMemberSnapshots.ContainerID)

          LEFT JOIN ContainerMemberSnapshots ON (ContainerMemberSnapshots.Name=Nodes.Caption)

          • Re: Query ?
            lcoursy

            I should be Joining on the names probably. I still get the same "" message as listed above, but with "ContainerMemberSnapshots.Name" .

             

            SELECT Caption, EM_Server_Level, IP_Address FROM Nodes

            LEFT JOIN Containers ON (Containers.Name=ContainerMemberSnapshots.Name)

            LEFT JOIN ContainerMemberSnapshots ON (ContainerMemberSnapshots.Name=Nodes.Caption)

            WHERE Containers.Name = 'WMASS'

            ORDER BY Nodes.Caption DESC;

            • Re: Query ?
              lcoursy

              FREAKING AWESOME njoylif!

               

              Thanks a ton!