Created
April 13, 2012 12:46
-
-
Save dmacvicar/2376687 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT 1, | |
| (SELECT 1 | |
| FROM rhnServerFeaturesView SFV | |
| WHERE SFV.server_id = S.id | |
| AND SFV.label = 'ftr_system_grouping') AS selectable | |
| FROM rhnServerInfo SI, | |
| rhnServer S, | |
| rhnActionErrataUpdate EA, | |
| rhnServerAction SA, | |
| rhnErrata E | |
| WHERE S.org_id = :org_id | |
| AND EXISTS (SELECT 1 FROM rhnUserServerPerms USP WHERE USP.user_id = :user_id AND USP.server_id = S.id) | |
| AND SI.server_id = S.id | |
| AND S.id = SA.server_id | |
| AND SA.action_id = EA.action_id | |
| AND EA.errata_id = E.id | |
| AND to_timestamp(S.last_boot) < SA.completion_time | |
| AND E.id IN (SELECT EK.errata_id FROM rhnErrataKeyword EK WHERE EK.keyword = :keyword) | |
| AND S.id=:sid | |
| ORDER BY SI.checkin DESC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment