Help on a query
Can you help me to get a filter by date on this query?
I have a custom field to get the date about the hotfix was installed, I'd like to filter this query below by device where have installed the hotfix by more than 30 days (or 1 month).
I'd like to show the devices that have installed the hotfix more than 30 days.
here the query I have.
M.NAME as 'System Name'
,(select replace(MCI.STR_FIELD_VALUE, "<br/>", "") from MACHINE_CUSTOM_INVENTORY MCI join SOFTWARE S on MCI.SOFTWARE_ID = S.ID where MCI.ID = M.ID and S.DISPLAY_NAME = "HotfixID") as 'HotfixID'
,(select replace(MCI.STR_FIELD_VALUE, "<br/>", "") from MACHINE_CUSTOM_INVENTORY MCI join SOFTWARE S on MCI.SOFTWARE_ID = S.ID where MCI.ID = M.ID and S.DISPLAY_NAME = "last date patched (date-fix)") as 'Last Date Patched'
JOIN MACHINE_LABEL_JT ML ON (M.ID = ML.MACHINE_ID)
JOIN LABEL L ON (ML.LABEL_ID = L.ID)
L.NAME = 'LABEL_NAME_XXX'
Could you explain why you are storing last date patched as custom inventory fields? - chucksteel 3 years ago
I raise the same question. It is my company needs...they want to know when the client have been patched, just the date is sufficient... now I'm stuck on this part hehehhee - scoterland 3 years ago
What I mean is, why are you storing it in a custom field and not reporting based on patching information? - chucksteel 3 years ago
Surely you just need to add to your WHERE statement when the last date patch date is greater than 30 days?
exactly!!! thanks to summarize... do you know how to do that? considering the return of the "last date patched (date-fix)" is M/D/YYYY - scoterland 3 years ago