User Defined Tables
SELECT fut.base_user_table_name UDT_name
, fuc.base_user_column_name UDT_column_name
, furf.row_low_range_or_name UDT_row_name
, fuci.value UDT_value
, ( SELECT pldgv.name
FROM per_legislative_data_groups_vl pldgv
WHERE pldgv.LEGISLATIVE_DATA_GROUP_ID = fut.LEGISLATIVE_DATA_GROUP_ID
) UDT_ldg
FROM ff_user_tables fut
, ff_user_rows_vl furf
, ff_user_columns fuc
, ff_user_column_instances_f fuci
WHERE fut.user_table_id = furf.user_table_id
AND :P_AS_OF_DATE BETWEEN (furf.effective_start_date) AND (furf.effective_end_date)
AND fut.user_table_id = fuc.user_table_id
AND fuci.user_row_id = furf.user_row_id
AND fuci.user_column_id = fuc.user_column_id
AND :P_AS_OF_DATE BETWEEN (fuci.effective_start_date) AND (fuci.effective_end_date)
AND ( (:P_CREATION_TYPE= 'Custom' and fut.created_by <> 'SEED_DATA_FROM_APPLICATION' )
OR
(:P_CREATION_TYPE = 'Seeded' and fut.created_by = 'SEED_DATA_FROM_APPLICATION' )
OR
(:P_CREATION_TYPE = 'Seeded Modified' and fut.created_by = 'SEED_DATA_FROM_APPLICATION' and fut.last_updated_by <> 'SEED_DATA_FROM_APPLICATION')
OR
(:P_CREATION_TYPE = 'ALL')
)