Hi Guys,
We're using Oracle 12c.
I want to use one of the following for my task. index-by tables, Nested tables or Varrays.
I want to create a one dimensional and a two dimensional table in a PL/ SQL procedure.
I just want the two dimensional table to hold the following data:
insert into SLDPROD.RPT_MAP
select 'LOAN' RPT_TYPE, 'SP_SLD_GEN_GIC_LOAN_DET' RPT_NAME from DUAL
union
select 'LOAN' RPT_TYPE, 'SP_SLD_GEN_GIC_LOAN_DET_FI' RPT_NAME from DUAL
union
select 'CLTRL' RPT_TYPE, 'SP_SLD_GEN_GIC_CLTRL_DET' RPT_NAME from DUAL
union
select 'CLTRL' RPT_TYPE, 'SP_SLD_GEN_GIC_CLTRL_DET_FI' RPT_NAME from DUAL
union
select 'REPO' RPT_TYPE, 'SP_SLD_GEN_GIC_REPO_DET' RPT_NAME from DUAL
union
select 'REPO' RPT_TYPE, 'SP_SLD_GEN_GIC_REPO_DET_FI' RPT_NAME from DUAL
union
select 'MO' RPT_TYPE, 'SP_SLD_GEN_GIC_MO_DET' RPT_NAME from DUAL
union
select 'MO' RPT_TYPE, 'SP_SLD_GEN_GIC_MO_DET_FI' RPT_NAME from DUAL
union
select 'REINV' RPT_TYPE, 'SP_SLD_GEN_GIC_REINV_DET' RPT_NAME from DUAL
union
select 'REINV' RPT_TYPE, 'SP_SLD_GEN_GIC_REINV_DET_FI' RPT_NAME from DUAL;
And I want to be able to relate the RPT_TYP column values to the RPT_NAME column via a select statement.
Also for the one dimensional table I want to store a list of tables I want to be able to call on that list via a select statement so I ca use ‘DISTINCT’ to remove all dups and then pass that list to a loop.
Which of the three Collections would be the best for each task?