Return to Snippet

Revision: 13212
at April 14, 2009 15:10 by theonlyalterego


Initial Code
select 
    f.file_id,
    f.filename,
    f.app_short_name,
    b.orig_bug_number patch_num,
    v.version,
    a.creation_date,
    decode(a.common_action_id, 4043, 'copy', 72746, 'sql') action
from 
    ad_files f,
    ad_file_versions v,
    ad_patch_run_bug_actions a,
    ad_patch_run_bugs b
where 
    f.filename = '&file_name'
    and f.file_id = v.file_id
    and v.file_version_id = nvl(a.patch_file_version_id, a.onsite_file_version_id)
    and a.patch_run_bug_id = b.patch_run_bug_id
order by a.action_id

Initial URL


Initial Description
This sql query will select the past version information about a given file from the database. An example would be searching for %ApprovalHistoryVOImpl% would return all past version numbers (in the database) for the ApprovalHistoryVOImpl.class file.

This is useful for checking which patch versions of a file have been applied to a given database.

Initial Title
Oracle SQL - Select OAF File version history

Initial Tags
database, sql, Oracle

Initial Language
SQL