Fix query outdated in Oracle

The oracle version of the Jobs.CompleteInput DAO that was changed in https://github.com/dmwm/WMCore/commit/a877b5c903b8c51cdead23dd58989811b8a3ff92 was not updated in that patch. Here is the update to make it Oracle compatible and include the new changes.