View slot9.WORLD.TSTA.ZZC1_NIBRS_PROP_MAPPINGS
Legend:
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
AUDIT_TIMESTAMP date 7  √  null
AUDIT_TRANSACTION_TYPE varchar2 1  √  null
AUDIT_USER_NAME varchar2 100  √  null
NIBRS_PROP_ID number 0  √  null
NIBRS_PROP_MAPPINGS.NIBRS_PROP_ID Implied Constraint R
PROPERTY_CODE_TYPE varchar2 30  √  null
PROPERTY_CODE varchar2 30  √  null
INC_VALID_PROPERTIES.PROPERTY_CODE Implied Constraint R
NIBRS_CODE varchar2 30  √  null
NIBRS_CODES.NIBRS_CODE Implied Constraint R
CODE_TYPE varchar2 30  √  null
CODE varchar2 30  √  null
BLOOD_TYPE_CODES.CODE Implied Constraint R
CREATOR_DATE date 7  √  null
UPDATOR_ID varchar2 100  √  null
UPDATOR_DATE date 7  √  null
CREATOR_ID varchar2 100  √  null
REC_ID number 0  √  null

Analyzed at Mon Sep 20 21:05 MDT 2021

View Definition:
with t as (SELECT ZZ1.AUDIT_TIMESTAMP AUDIT_TIMESTAMP, ZZ1.AUDIT_TRANSACTION_TYPE AUDIT_TRANSACTION_TYPE, ZZ1.AUDIT_USER_NAME AUDIT_USER_NAME, ZZ1.AUDIT_TRUE_NULLS AUDIT_TRUE_NULLS, ZZ1.NIBRS_PROP_ID NIBRS_PROP_ID, ZZ1.PROPERTY_CODE_TYPE PROPERTY_CODE_TYPE, ZZ1.PROPERTY_CODE PROPERTY_CODE, ZZ1.NIBRS_CODE NIBRS_CODE, ZZ1.CODE_TYPE CODE_TYPE, ZZ1.CODE CODE, ZZ1.CREATOR_DATE CREATOR_DATE, ZZ1.UPDATOR_ID UPDATOR_ID, ZZ1.UPDATOR_DATE UPDATOR_DATE, ZZ1.CREATOR_ID CREATOR_ID, ZZ1.REC_ID REC_ID FROM ZZ_NIBRS_PROP_MAPPINGS ZZ1 union all select sysdate, 'C', null, null, ZZ2.NIBRS_PROP_ID, ZZ2.PROPERTY_CODE_TYPE, ZZ2.PROPERTY_CODE, ZZ2.NIBRS_CODE, ZZ2.CODE_TYPE, ZZ2.CODE, ZZ2.CREATOR_DATE, ZZ2.UPDATOR_ID, ZZ2.UPDATOR_DATE, ZZ2.CREATOR_ID, ZZ2.REC_ID FROM NIBRS_PROP_MAPPINGS ZZ2 where exists ( select * from ZZ_NIBRS_PROP_MAPPINGS where NIBRS_PROP_ID= ZZ2.NIBRS_PROP_ID )) select AUDIT_TIMESTAMP, AUDIT_TRANSACTION_TYPE, AUDIT_USER_NAME, NIBRS_PROP_ID, PROPERTY_CODE_TYPE, PROPERTY_CODE, NIBRS_CODE, CODE_TYPE, CODE, CREATOR_DATE, UPDATOR_ID, UPDATOR_DATE, CREATOR_ID, REC_ID from ( select AUDIT_TIMESTAMP, AUDIT_TRANSACTION_TYPE, AUDIT_USER_NAME, NIBRS_PROP_ID,( CASE WHEN audit_transaction_type in ( 'C','D') then PROPERTY_CODE_TYPE ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),6,1),'N') ='N' THEN lead(PROPERTY_CODE_TYPE ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) PROPERTY_CODE_TYPE,( CASE WHEN audit_transaction_type in ( 'C','D') then PROPERTY_CODE ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),7,1),'N') ='N' THEN lead(PROPERTY_CODE ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) PROPERTY_CODE,( CASE WHEN audit_transaction_type in ( 'C','D') then NIBRS_CODE ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),8,1),'N') ='N' THEN lead(NIBRS_CODE ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) NIBRS_CODE,( CASE WHEN audit_transaction_type in ( 'C','D') then CODE_TYPE ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),9,1),'N') ='N' THEN lead(CODE_TYPE ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) CODE_TYPE,( CASE WHEN audit_transaction_type in ( 'C','D') then CODE ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),10,1),'N') ='N' THEN lead(CODE ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) CODE,( CASE WHEN audit_transaction_type in ( 'C','D') then CREATOR_DATE ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),11,1),'N') ='N' THEN lead(CREATOR_DATE ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) CREATOR_DATE,( CASE WHEN audit_transaction_type in ( 'C','D') then UPDATOR_ID ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),12,1),'N') ='N' THEN lead(UPDATOR_ID ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) UPDATOR_ID,( CASE WHEN audit_transaction_type in ( 'C','D') then UPDATOR_DATE ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),13,1),'N') ='N' THEN lead(UPDATOR_DATE ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) UPDATOR_DATE,( CASE WHEN audit_transaction_type in ( 'C','D') then CREATOR_ID ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),14,1),'N') ='N' THEN lead(CREATOR_ID ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) CREATOR_ID,( CASE WHEN audit_transaction_type in ( 'C','D') then REC_ID ELSE (CASE WHEN NVL(SUBSTR(lead(AUDIT_TRUE_NULLS) over (partition by NIBRS_PROP_ID order by audit_timestamp asc),15,1),'N') ='N' THEN lead(REC_ID ignore nulls) over (partition by NIBRS_PROP_ID order by audit_timestamp asc) END) END) REC_ID,row_number() over (partition by NIBRS_PROP_ID order by audit_timestamp asc) as rn from t )
 
Possibly Referenced Tables/Views:


Close relationships: