DECLARE @ResourceID int = (Select resourceid from v_r_system where netbios_name0 = 'ComputerNameHere')

select
h.resourceid ,
h.Category0 as 'UpdateCategory'
,h.Make0 as 'Make'
,h.ModelName0 as 'ModelName'
,h.ModelID0 as 'ModelID'
,h.Type0 as 'Update Type'
,h.UpdateID0 as 'UpdateID'
,h.UpdateName0 as 'Update Name'
,h.ExistingVersion0 as 'Installed Version if known'
,h.UpdateVersion0 as 'Update Version'
,h.URL0 as 'Update Source'
,h.UpdateDate0 as 'UpdateDate'
,h.ScriptLastRan0 as 'ScriptLastRan'
,Case when CHARINDEX('\',h.hwid0) >0 then  Left(h.hwid0, charindex('\',h.hwid0)-1)
else h.HWID0 end as 'DriverType'
from v_GS_HWUpdates0 h
where DATEDIFF(DAY,h.ScriptLastRan0,GETDATE()) < 21