Skip to content

Query for finding packages with expired Ads

Featured Replies

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

Join the conversation

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

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.