select
    P.Name,
    P.Version,
    PS.Location
from
    dbo.v_Package P
    join dbo.v_PackageStatus PS on p.PackageId = PS.PackageID
Where
    PS.PKGServer like ‘%SCCM%’
    and PS.Location like ‘%SMSPKGD$%’