24 December 2009

Query7: Show OwnerNS for Computers

SELECT     vRM_Resource_Item_Partitioned.Name, vRM_Resource_Item_Partitioned.Guid, Item.Name AS ResourceType, Item_1.Name AS OwnerNS,
                      vRM_Resource_Item_Partitioned.IsManaged
FROM         vRM_Resource_Item_Partitioned INNER JOIN
                      Item ON vRM_Resource_Item_Partitioned.ResourceTypeGuid = Item.Guid INNER JOIN
                      Item AS Item_1 ON vRM_Resource_Item_Partitioned.OwnerNSGuid = Item_1.Guid
WHERE     (vRM_Resource_Item_Partitioned.ResourceTypeGuid = '493435f7-3b17-4c4c-b07f-c23e7ab7781f') OR
                      (vRM_Resource_Item_Partitioned.ResourceTypeGuid = '2c3cb3bb-fee9-48df-804f-90856198b600')

No comments: