Pages

Systems part of what collections?

SELECT v_R_System.Name0, v_Collection.Name FROM v_FullCollectionMembership INNER JOIN v_R_System ON v_FullCollectionMembership.ResourceID = v_R_System.ResourceID INNER JOIN v_Collection ON v_FullCollectionMembership.CollectionID = v_Collection.CollectionID WHERE (v_R_System.Name0 = 'Systemname')

for Webbased reports:--

Here is the main section:
SELECT v_FullCollectionMembership.Name as 'Computer Name', v_Collection.Name as 'Collection Name'
FROM v_Collection v_Collection, v_FullCollectionMembership v_FullCollectionMembership
WHERE v_FullCollectionMembership.CollectionID = v_Collection.CollectionID AND (v_FullCollectionMembership.Name=@prompt)

Here is the "prompt" section:
begin
 if (@__filterwildcard = '')
  SELECT DISTINCT v_FullCollectionMembership.Name from v_FullCollectionMembership
Order by v_FullCollectionMembership.Name
 else
  SELECT DISTINCT v_FullCollectionMembership.Name from v_FullCollectionMembership
  WHERE v_FullCollectionMembership.Name like @__filterwildcard
  Order by v_FullCollectionMembership.Name
end

-------------------
Thanks,
http://sccm07.blogspot.com/

0 comments:

Post a Comment