Select Distinct Top 1000000 tblAssets.AssetID, tblAssets.AssetName, tblAssets.Domain, tsysAssetTypes.AssetTypename As AssetType, tblAssets.Username, tblAssets.Userdomain, tsysAssetTypes.AssetTypeIcon10 As icon, tblAssets.IPAddress, tsysIPLocations.IPLocation, tblAssetCustom.Manufacturer, tblAssetCustom.Model, tsysOS.OSname As OS, tblAssets.Version As OSVersion, tblAssets.SP, subquery1.Software, subquery1.Version, subquery1.Publisher, subquery1.EOLDate, Case When IsDate(subquery1.EOLDate) = 1 and GetDate() < subquery1.EOLDate Then Cast(DateDiff(DAY, GetDate(), subquery1.EOLDate) As NVARCHAR) + ' days remaining' End As [Days Remaining], tblAssets.Lastseen, tblAssets.Lasttried, Case When subquery1.EOLDate = 'EOL' then '#ffadad' When IsDate(subquery1.EOLDate) = 1 and GetDate() > subquery1.EOLDate Then '#ffadad' When IsDate(subquery1.EOLDate) = 1 and GetDate() >= DateAdd(month, -1, subquery1.EOLDate) Then '#ffd152' Else '#d4f4be' End As backgroundcolor From tblAssets Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype Inner Join tsysIPLocations On tsysIPLocations.LocationID = tblAssets.LocationID Inner Join tblState On tblState.State = tblAssetCustom.State Left Join tsysOS On tsysOS.OScode = tblAssets.OScode Left Join (Select tblSoftwareUni.softwareName As Software, tblsoftware.softwareVersion As Version, tblSoftwareUni.SoftwarePublisher As Publisher, Case When Cast(ParseName(tblsoftware.softwareVersion, 4) As int) <= 14 Then 'EOL' When tblsoftware.softwareVersion Like '15.%' Then '2023-04-11' When tblsoftware.softwareVersion Like '16.%' and tblSoftwareUni.softwareName like '%2016%' Then '2025-10-14' When tblsoftware.softwareVersion Like '16.%' and tblSoftwareUni.softwareName like '%2019%' Then '2025-10-14' When tblsoftware.softwareVersion Like '16.%' and tblSoftwareUni.softwareName like '%2021%' Then '2026-10-13' End As EOLDate, tblsoftware.AssetID From tblsoftware Inner Join tblSoftwareUni On tblSoftwareUni.SoftID = tblsoftware.softID Where (tblSoftwareUni.softwareName Like '%Microsoft Visio%' and tblSoftwareUni.softwareName not like '%compatibility%' and tblSoftwareUni.softwareName not like '%3D%' And tblSoftwareUni.SoftwarePublisher Like '%Microsoft%')) As subquery1 On subquery1.AssetID = tblAssets.AssetID Where (subquery1.Software Like '%Microsoft Visio%' and subquery1.Software not Like '%compatibility%' and subquery1.Software not like '%3D%' And subquery1.Publisher Like '%Microsoft%') and tblState.Statename = 'Active'
Explore the full platform, free for 14 days.
No credit card required.