In this session we are going to see sample SQL to generate the results from User Defined Table. Please replace the table name and column name based on your requirements.
with udt_table_vw1 as (
select fuc.user_column_name
,fur.row_name exact
,fuci.value
from ff_user_tables_vl fut
,ff_user_columns_vl fuc
,ff_user_rows_vl fur
,ff_user_column_instances_f fuci
where 1 = 1
and fuc.user_table_id = fut.user_table_id
and fur.user_table_id = fut.user_table_id
and fuci.user_column_id = fuc.user_column_id
and fuci.user_row_id = fur.user_row_id
and fut.user_table_name in ('TABLE_NAME')
and :p_eff_dt between fuci.effective_start_date and fuci.effective_end_date
)
,udt_table_vw2 as (
select * from udt_table_vw1
pivot (max(value) for user_column_name in (
'COLUMN1' COLUMN1
,'COLUMN2' COLUMN2
))
)
select * from udt_table_vw2
WITH SAWITH0 AS ( select /*+ inline */ T5889157.C442017697 as c3, T5889157.C435128591 as c4, T5889157.C262853249 as c5, T5889157.C475696698 as c6, T5889157.C171798894 as c7, T5889157.C350832392 as c8, T5889157.C180745024 as c9, T5889157.C171898426 as c10, T5889157.C43504333 as c11, T5889157.C3583004 as c12, T5889157.C458818009 as c13 from ( SELECT V184978139.USER_CATEGORY_NAME AS C442017697, V148402464.DIMENSION_NAME AS C435128591, V187766949.BALANCE_NAME AS C262853249, V294690684.NAME AS C475696698, ...
Comments
Post a Comment