You are on page 1of 1

Select Doc_cuid, max(DOC_NME) over(Partition by Doc_cuid) ,max(UNIVERSE ) over(Partition by

Doc_cuid ) ,OBJECTS

From

Select DISTINCT

audit_event.object_cuid as Doc_CUID,

Max( case when AUDIT_DETAIL.DETAIL_type_id in(8)then RTRIM(TO_CHAR(AUDIT_DETAIL.Detail_text),


CHR(0)) end ) as DOC_NME ,

Max( case when AUDIT_DETAIL.DETAIL_type_id in(2) then RTRIM(TO_CHAR(AUDIT_DETAIL.Detail_text),


CHR(0)) end ) as UNIVERSE,

( case when AUDIT_DETAIL.DETAIL_type_id in(3) then RTRIM(TO_CHAR(AUDIT_DETAIL.Detail_text),


CHR(0)) end ) as OBJECTS

From

Audit_event, Audit_detail , Event_type , Detail_type , Server_process

Where

Audit_event.Server_cuid = AUDIT_DETAIL.Server_cuid

And (AUDIT_EVENT.Event_id = AUDIT_DETAIL.Event_id)

And AUDIT_DETAIL.Detail_type_id = Detail_type.Detail_type_id

And AUDIT_EVENT.Event_type_id = Event_type.Event_type_id

And AUDIT_EVENT.Server_cuid=server_process.Server_cuid

And Audit_event.User_name <>'Administrator'

and audit_event.START_TIMESTAMP>sysdate-1

and AUDIT_EVENT.Event_type_id in (11,19) and AUDIT_DETAIL.DETAIL_type_id in (3,2,8)

Group By

audit_event.object_cuid,( case when AUDIT_DETAIL.DETAIL_type_id in

(3) then RTRIM(TO_CHAR(AUDIT_DETAIL.Detail_text), CHR(0)) end)

You might also like