cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hyvokar
Engaged Sweeper II

Hi, 

would it be possible to have a report for windows updates installed in past 24/48 hours, just like installed software report? 

 

Br, 

Kari

6 REPLIES 6
Mister_Nobody
Honored Sweeper II

@hyvokar did you try report?

Mister_Nobody
Honored Sweeper II

Installed Windows Updates Query last 3 days

Select Top 1000000 tblAssets.AssetID,
  tblAssets.AssetName,
  tblAssets.Domain,
  tblAssets.Username,
  tblAssets.Userdomain,
  Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
  tblAssets.IPAddress,
  tsysIPLocations.IPLocation,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  tsysOS.OSname As OS,
  tblAssets.SP,
  tblAssets.Lastseen,
  tblAssets.Lasttried,
  tblQuickFixEngineeringUni.HotFixID,
  tblQuickFixEngineeringUni.Description,
  tblQuickFixEngineeringUni.FixComments,
  tblQuickFixEngineeringInstalledBy.InstalledBy,
  tblQuickFixEngineering.InstalledOn,
  tblQuickFixEngineering.Lastchanged As LastChanged
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tblState On tblState.State = tblAssetCustom.State
  Inner Join tsysIPLocations On tsysIPLocations.LocationID =
      tblAssets.LocationID
  Inner Join tblQuickFixEngineering On tblQuickFixEngineering.AssetID =
      tblAssets.AssetID
  Inner Join tblQuickFixEngineeringUni On tblQuickFixEngineeringUni.QFEID =
      tblQuickFixEngineering.QFEID
  Left Join tblQuickFixEngineeringInstalledBy On
      tblQuickFixEngineeringInstalledBy.InstalledByID =
      tblQuickFixEngineering.InstalledByID
  Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblQuickFixEngineering.InstalledOn > GetDate() - 3 And
  tblState.Statename = 'Active'
Order By tblAssets.Domain,
  tblAssets.AssetName,
  tblQuickFixEngineeringUni.HotFixID

Hi Mr.  I am getting the following error message:

"The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value"

I am using version 11.4.0.4.  Can you pls help to understand the cause?

Regards

Select Top 1000000 tblAssets.AssetID,
  tblAssets.AssetName,
  tblAssets.Domain,
  tblAssets.Username,
  tblAssets.Userdomain,
  Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
  tblAssets.IPAddress,
  tsysIPLocations.IPLocation,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  tsysOS.OSname As OS,
  tblAssets.SP,
  tblAssets.Lastseen,
  tblAssets.Lasttried,
  tblQuickFixEngineeringUni.HotFixID,
  tblQuickFixEngineeringUni.Description,
  tblQuickFixEngineeringUni.FixComments,
  tblQuickFixEngineeringInstalledBy.InstalledBy,
  tblQuickFixEngineering.InstalledOn,
  tblQuickFixEngineering.Lastchanged As LastChanged
From tblAssets
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tblState On tblState.State = tblAssetCustom.State
  Inner Join tsysIPLocations On tsysIPLocations.LocationID =
      tblAssets.LocationID
  Inner Join tblQuickFixEngineering On tblQuickFixEngineering.AssetID =
      tblAssets.AssetID
  Inner Join tblQuickFixEngineeringUni On tblQuickFixEngineeringUni.QFEID =
      tblQuickFixEngineering.QFEID
  Left Join tblQuickFixEngineeringInstalledBy On
      tblQuickFixEngineeringInstalledBy.InstalledByID =
      tblQuickFixEngineering.InstalledByID
  Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where isdate(tblQuickFixEngineering.InstalledOn) and tblQuickFixEngineering.InstalledOn > GetDate() - 3 And
  tblState.Statename = 'Active'
Order By tblAssets.Domain,
  tblAssets.AssetName,
  tblQuickFixEngineeringUni.HotFixID

Thank you!

👍

Remove 

> GetDate() - 3

 Then sort by 

tblQuickFixEngineering.InstalledOn

 And looking for strings instead date