好吧。让我这么跟你解释!
我有一个下面的查询,当我运行这个,它会提示我的机器名。一旦提供了机器名,它将显示信息,如,补丁名称,是否需要,是否安装。现在,我想类似的报告,这将提示集合的名称不是为一台机器,并为整个集合提供相同的报告。你能帮我吗?
声明@lcid为int set @lcid = dbo.fn_LShortNameToLCID(@locale)
选择
盾供应商=。CategoryInstanceName,
UpdateClassification = cls。CategoryInstanceName,
ui。标题,
ui。BulletinID,
ui。一个rticleID,
目标=(当中医。ResourceIDis not null then '*' else '' end),
安装=(当css。Status=3 then '*' else " end),
IsRequired =(当css。Status=2 then '*' else " end),
最后期限= cdl。最后期限,
ui。CI_UniqueID UniqueUpdateID,
ui。InfoURL作为InformationURL
从fn_rbac_UpdateComplianceStatus (@UserSIDs) css
join fn_rbac_UpdateInfo(@lcid, @ usersid) ui on ui. ci_id =css.CI_ID
join fn_rbac_CICategoryInfo_All(@lcid, @ usersid) vnd on vnd. ci_id =ui。CI_ID和盾。CategoryTypeName = '公司'
join fn_rbac_CICategoryInfo_All(@lcid, @ usersid) cls on cls. ci_id =ui。CI_ID和cls。CategoryTypeName = ' UpdateClassification '
left join fn_rbac_CITargetedMachines(@ usersid) ctm on ctm. ci_id =css。CI_ID和中医。ResourceID= css.ResourceID
外应用(
选择期限= min (a.EnforcementDeadline)
从fn_rbac_CIAssignment (@UserSIDs)
join fn_rbac_CIAssignmentToCI(@ usersid) atc on atc. assignmentd =a。AssignmentID和atc.CI_ID = css.CI_ID
cdl)
在css。ResourceID= @RscID
and (@Vendor = " or vnd. "CategoryInstanceName = @Vendor)
and (@UpdateClass = " or cls。CategoryInstanceName = @UpdateClass)
order by ui。标题