1
select `cmp`.`ClientID` AS `ClientID`,`cmp`.`LocationID` AS `LocationID`,`ph`.`ComputerID` AS `ComputerID`,`ph`.`ActionDate` AS `PatchingDate`,`ph`.`UpdateID` AS `HotfixID`,`pht`.`Title` AS `PatchingTitle`,`phc`.`Name` AS `PatchingSource`,elt(`ph`.`Operation`,'Install','Uninstall') AS `PatchingOperation`,elt((`ph`.`ResultCode` + 1),'Not Started','In Progress','Success','Success w/Errors','Failed','Aborted') AS `PatchingResult` from (((`labtech`.`computers` `cmp` join `labtech`.`patchhistory` `ph` on((`cmp`.`ComputerID` = `ph`.`ComputerID`))) join `labtech`.`patchhistoryclients` `phc` on((`ph`.`PatchHistoryClientID` = `phc`.`ID`))) join `labtech`.`patchhistorytitles` `pht` on((`ph`.`PatchHistoryTitleID` = `pht`.`ID`)))