1821: return;
1822: end if;
1823:
1824: select instance_type into l_inst_type
1825: from qpr_instances
1826: where instance_id = p_instance_id;
1827:
1828: select count(*) into l_src_count
1829: from QPR_MEASURE_SOURCES
1957: from qpr_measure_sources
1958: where measure_type_code = s_deal_type
1959: and tgt_tbl_name = DEAL_HEADER_TBL
1960: and INSTANCE_TYPE = (select instance_type
1961: from qpr_instances
1962: where instance_id = p_instance_id);
1963: if p_quote_header_id is null then
1964: l_sql := 'select quote_header_id, quote_header_sd, source_id from '
1965: || src_tbl_name||qpr_sr_util.get_dblink(p_instance_id)
2035:
2036: cursor c_src_cols(m_src_tname varchar2) is
2037: select distinct nvl(USER_SRC_COL_NAME,SRC_COL_NAME) SRC_COL_NAME,
2038: nvl(USER_TGT_COL_NAME,TGT_COL_NAME) TGT_COL_NAME
2039: from QPR_MEASURE_SOURCES src, qpr_instances inst
2040: where src.instance_type = inst.instance_type
2041: and inst.instance_id = p_instance_id
2042: and src.measure_type_code = decode(p_source_id, 660, 'OM_DEALINT',
2043: 697, 'ASO_DEALINT')
2045: order by TGT_COL_NAME;
2046:
2047: begin
2048: select distinct src_tbl_name into l_src_tbl
2049: from qpr_measure_sources src, qpr_instances inst
2050: where src.instance_type = inst.instance_type
2051: and inst.instance_id = p_instance_id
2052: and src.measure_type_code = decode(p_source_id, 660, 'OM_DEALINT',
2053: 697, 'ASO_DEALINT')