需要使用SCCM视图在工作站上进行银色安装

时间:2019-02-05 11:26:20

标签: sql sql-server

感谢我从本网站获得的所有支持。

我有查询,我通常使用该查询来获取modelcount的百分比。 我使用iam在工作站上获取白光信息,这是使用SCCm cviews。

    select distinct(e.FileVersion0)  as version,count(distinct(s.Name0)) as modelcount, e.ExecutableName0,
(CAST((CAST(count(*) AS DECIMAL(18,2))/CAST((select count(*) from v_GS_INSTALLED_EXECUTABLE e inner join v_r_system s on s.resourceid=e.resourceid 
join v_FullCollectionMembership fcm on fcm.ResourceID = s.ResourceID where e.ExecutableName0 like 'Silverlight%')  AS 
DECIMAL(18,2))) *100 as DECIMAL(18,2))) as 'Percent', '%' as per
 from v_GS_INSTALLED_EXECUTABLE e
join v_r_system s on s.resourceid = e.ResourceID
join v_FullCollectionMembership fcm on fcm.ResourceID = s.ResourceID
where e.ExecutableName0 like 'Silverlight%'
and not e.ExecutableName0 like 'Silverlight.Configuration%'
group by e.fileversion0,e.ExecutableName0

使用此查询获取以下数据

enter image description here

我没有获得百分比权限,我不确定为什么,因为查询百分比iam用于其他应用程序(例如Windows Defender或SEP iam)的结果。

    (CAST((CAST(count(*) AS DECIMAL(18,2))/CAST((select count(*) from v_GS_INSTALLED_EXECUTABLE e inner join v_r_system s on s.resourceid=e.resourceid 
join v_FullCollectionMembership fcm on fcm.ResourceID = s.ResourceID where e.ExecutableName0 like 'Silverlight%')  AS 
DECIMAL(18,2))) *100 as DECIMAL(18,2))) as 'Percent'

你能帮我吗?

0 个答案:

没有答案