Jump to content


  • 0
kvineets

Query for finding packages with expired Ads

Question

Hi

 

I was planning to do some housekeeping on DPs by removing unsued packages. Got a sql query from somewhere which gives the package details are associated with expired Ads which helped me to find obsolete packages and its easier to remove those from DPs and free some space.

 

SELECT PackageID, Name, Version, Manufacturer, Language, Description,
PkgSourcePath AS [source Path], LastRefreshTime,
(SELECT COUNT(PkgID) FROM vPkgStatusSummaryDistPts WHERE PkgID = v_Package.PackageID) AS [No of DP]
FROM v_Package
WHERE
PackageID NOT IN (SELECT PackageID FROM v_Advertisement) AND
PackageID NOT IN (SELECT ReferencePackageID FROM v_TaskSequenceReferencesInfo) AND
PackageType = 0
ORDER BY Name

 

Dont remember from where I got the query but if its from this forum , do excuse me :P

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.