this query snippet may help:
select
cmn_audits.id
, inv.id inv_internal_id
, inv.code investment_id
, row_number()
over (order by cmn_audits.table_name, cmn_audits.object_id, cmn_audits.attribute_code, cmn_audits.created_date)
as sort_by_this
, cmn_audits.table_name
, cmn_audits.object_id
, cmn_audits.attribute_code
, cmn_audits.value_before value_before_id
, cmn_audits.value_after value_after_id
, cap_bef.name value_before
, cap_aft.name value_after
, case when cmn_audits.operation_code = 'D' then 'Deleted'
when cmn_audits.operation_code = 'U' then 'Updated'
when cmn_audits.operation_code = 'I' then 'Inserted'
end AS operation_code
, cmn_audits.created_date AS change_date
, srm_resources.full_name AS changed_by
, lag(cmn_audits.created_date)
over (partition by cmn_audits.table_name, cmn_audits.object_id, cmn_audits.attribute_code
order by cmn_audits.created_date)
as prev_change_date
, lag(case when cmn_audits.operation_code = 'D' then 'Deleted'
when cmn_audits.operation_code = 'U' then 'Updated'
when cmn_audits.operation_code = 'I' then 'Inserted'
end)
over (partition by cmn_audits.table_name, cmn_audits.object_id, cmn_audits.attribute_code
order by cmn_audits.created_date)
as prev_operation_code
from cmn_audits
left join srm_resources on cmn_audits.created_by = srm_resources.user_id
inner join ODF_AUD_LOOKUP_CAPTIONS cap_bef on cmn_audits.value_before = TO_CHAR(cap_bef.id) and cap_bef.language_code = 'en'
inner join ODF_AUD_LOOKUP_CAPTIONS cap_aft on cmn_audits.value_after = TO_CHAR(cap_aft.id) and cap_aft.language_code = 'en'
Original Message:
Sent: 10-16-2020 12:21 PM
From: Kritee Saksena
Subject: Project OBS audit
Thanks for your reply, Just wondering which column of cmn_audits table I search for odf_proj_?
Original Message:
Sent: 10-15-2020 05:01 PM
From: Maria Whiteside
Subject: Project OBS audit
Hi Kritee,
The OBS audit details can be found in the cmn_audits table. You'll just need to get the attribute id corresponding to the Project OBS on the Project object. These are automatically created ID's so they would look something like this: odf_proj_n998864610
Original Message:
Sent: 10-07-2020 02:53 PM
From: Kritee Saksena
Subject: Project OBS audit
Hi
How can we find Project OBS association in audit from DB query.
We do not see OBS in cmn_audits even thought it is audited in Project object and we can see the values in Project audit.
Please help s identify table or query from where we can pull what we see in Project audit tab.
Thanks,
Kritee