DBA Data[Home] [Help]

APPS.BSC_UPDATE_DIM dependencies on BSC_SYS_DIM_LEVEL_RELS

Line 538: FROM bsc_sys_dim_level_rels r, bsc_sys_dim_levels_b t

534: h_level_pk_col bsc_sys_dim_levels_b.level_pk_col%TYPE;
535:
536: CURSOR c_child_mn (p_dim_level_id NUMBER, p_relation_type NUMBER) IS
537: SELECT r.relation_col, t.level_pk_col
538: FROM bsc_sys_dim_level_rels r, bsc_sys_dim_levels_b t
539: WHERE t.dim_level_id = r.parent_dim_level_id AND
540: r.dim_level_id = p_dim_level_id AND r.relation_type = p_relation_type;
541:
542: h_mn_dim_table bsc_sys_dim_level_rels.relation_col%TYPE;

Line 542: h_mn_dim_table bsc_sys_dim_level_rels.relation_col%TYPE;

538: FROM bsc_sys_dim_level_rels r, bsc_sys_dim_levels_b t
539: WHERE t.dim_level_id = r.parent_dim_level_id AND
540: r.dim_level_id = p_dim_level_id AND r.relation_type = p_relation_type;
541:
542: h_mn_dim_table bsc_sys_dim_level_rels.relation_col%TYPE;
543: h_mn_level_pk_col bsc_sys_dim_levels_b.level_pk_col%TYPE;
544:
545: CURSOR c_child (p_parent_id NUMBER, p_relation_type NUMBER) IS
546: SELECT t.level_table_name

Line 547: FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r

543: h_mn_level_pk_col bsc_sys_dim_levels_b.level_pk_col%TYPE;
544:
545: CURSOR c_child (p_parent_id NUMBER, p_relation_type NUMBER) IS
546: SELECT t.level_table_name
547: FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r
548: WHERE t.dim_level_id = r.dim_level_id AND
549: r.parent_dim_level_id = p_parent_id AND r.relation_type = p_relation_type;
550:
551: h_child_dim_table bsc_sys_dim_levels_b.level_table_name%TYPE;

Line 1702: ' FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r'||

1698:
1699: /*
1700: c_child_dimensions t_cursor; -- h_table_id, 1
1701: c_child_dimensions_sql VARCHAR2(2000) := 'SELECT t.level_table_name'||
1702: ' FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r'||
1703: ' WHERE t.dim_level_id = r.dim_level_id AND'||
1704: ' r.parent_dim_level_id = :1 AND r.relation_type = :2';
1705: */
1706: CURSOR c_child_dimensions (p_parent_id NUMBER, p_relation_type NUMBER) IS

Line 1708: FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r

1704: ' r.parent_dim_level_id = :1 AND r.relation_type = :2';
1705: */
1706: CURSOR c_child_dimensions (p_parent_id NUMBER, p_relation_type NUMBER) IS
1707: SELECT t.level_table_name
1708: FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r
1709: WHERE t.dim_level_id = r.dim_level_id AND
1710: r.parent_dim_level_id = p_parent_id AND r.relation_type = p_relation_type;
1711:
1712: h_child_dimension VARCHAR2(30);

Line 1760: FROM bsc_sys_dim_levels_b c, bsc_sys_dim_level_rels r, bsc_sys_dim_levels_b p

1756: ) RETURN NUMBER IS
1757:
1758: CURSOR c_parent_cols IS
1759: SELECT p.level_pk_col
1760: FROM bsc_sys_dim_levels_b c, bsc_sys_dim_level_rels r, bsc_sys_dim_levels_b p
1761: WHERE c.dim_level_id = r.dim_level_id AND
1762: r.parent_dim_level_id = p.dim_level_id AND
1763: r.relation_type = 1 AND
1764: r.dim_level_id <> r.parent_dim_level_id AND

Line 2017: ' FROM bsc_sys_dim_level_rels'||

2013:
2014: -- See if the dimension table is MN
2015: /*
2016: h_sql := 'SELECT COUNT(*)'||
2017: ' FROM bsc_sys_dim_level_rels'||
2018: ' WHERE relation_col = :1';
2019: OPEN h_cursor FOR h_sql USING x_dim_table;
2020: FETCH h_cursor INTO h_count;
2021: CLOSE h_cursor;

Line 2025: FROM bsc_sys_dim_level_rels

2021: CLOSE h_cursor;
2022: */
2023: SELECT COUNT(*)
2024: INTO h_count
2025: FROM bsc_sys_dim_level_rels
2026: WHERE relation_col = x_dim_table;
2027:
2028: IF h_count > 0 THEN
2029: RETURN DIM_TABLE_TYPE_MN;

Line 2052: ' bsc_sys_dim_level_rels r'||

2048: /*
2049: c_parents t_cursor; -- x_dim_table
2050: c_parents_sql VARCHAR2(2000) := 'SELECT dp.level_table_name, dp.level_pk_col'||
2051: ' FROM bsc_sys_dim_levels_b d, bsc_sys_dim_levels_b dp,'||
2052: ' bsc_sys_dim_level_rels r'||
2053: ' WHERE d.dim_level_id = r.dim_level_id AND'||
2054: ' r.parent_dim_level_id = dp.dim_level_id AND'||
2055: ' DECODE(r.relation_type, 2, r.relation_col,'||
2056: ' d.level_table_name) = :1';

Line 2060: FROM bsc_sys_dim_levels_b d, bsc_sys_dim_levels_b dp, bsc_sys_dim_level_rels r

2056: ' d.level_table_name) = :1';
2057: */
2058: CURSOR c_parents (p_dim_table VARCHAR2) IS
2059: SELECT dp.level_table_name, dp.level_pk_col
2060: FROM bsc_sys_dim_levels_b d, bsc_sys_dim_levels_b dp, bsc_sys_dim_level_rels r
2061: WHERE d.dim_level_id = r.dim_level_id AND
2062: r.parent_dim_level_id = dp.dim_level_id AND
2063: DECODE(r.relation_type, 2, r.relation_col, d.level_table_name) = p_dim_table;
2064:

Line 2176: ' FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r'||

2172:
2173: /*
2174: c_parent_dimensions t_cursor; -- h_table_id, 1
2175: c_parent_dimensions_sql VARCHAR2(2000) := 'SELECT t.level_table_name'||
2176: ' FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r'||
2177: ' WHERE t.dim_level_id = r.parent_dim_level_id AND'||
2178: ' r.dim_level_id = :1 AND r.relation_type = :2';
2179: */
2180: CURSOR c_parent_dimensions (p_dim_level_id NUMBER, p_relation_type NUMBER) IS

Line 2182: FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r

2178: ' r.dim_level_id = :1 AND r.relation_type = :2';
2179: */
2180: CURSOR c_parent_dimensions (p_dim_level_id NUMBER, p_relation_type NUMBER) IS
2181: SELECT t.level_table_name
2182: FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r
2183: WHERE t.dim_level_id = r.parent_dim_level_id AND
2184: r.dim_level_id = p_dim_level_id AND r.relation_type = p_relation_type;
2185:
2186: h_parent_dimension VARCHAR2(30);

Line 2235: ' FROM bsc_sys_dim_levels_b d, bsc_sys_dim_level_rels r'||

2231:
2232: /*
2233: c_relation_cols t_cursor; -- x_dimension_table, 1
2234: c_relation_cols_sql VARCHAR2(2000) := 'SELECT r.relation_col'||
2235: ' FROM bsc_sys_dim_levels_b d, bsc_sys_dim_level_rels r'||
2236: ' WHERE d.dim_level_id = r.dim_level_id AND'||
2237: ' d.level_table_name = :1 AND r.relation_type = :2';
2238: */
2239: CURSOR c_relation_cols (p_level_table_name VARCHAR2, p_relation_type NUMBER) IS

Line 2241: FROM bsc_sys_dim_levels_b d, bsc_sys_dim_level_rels r

2237: ' d.level_table_name = :1 AND r.relation_type = :2';
2238: */
2239: CURSOR c_relation_cols (p_level_table_name VARCHAR2, p_relation_type NUMBER) IS
2240: SELECT r.relation_col
2241: FROM bsc_sys_dim_levels_b d, bsc_sys_dim_level_rels r
2242: WHERE d.dim_level_id = r.dim_level_id AND
2243: d.level_table_name = p_level_table_name AND r.relation_type = p_relation_type;
2244:
2245: h_num_relation_cols NUMBER;

Line 3333: from bsc_sys_dim_levels_b d, bsc_sys_dim_level_rels r

3329: h_count := 0;
3330:
3331: select count(d.dim_level_id)
3332: into h_count
3333: from bsc_sys_dim_levels_b d, bsc_sys_dim_level_rels r
3334: where d.dim_level_id = r.dim_level_id and
3335: d.level_table_name = x_dim_table and
3336: r.parent_dim_level_id = r.dim_level_id;
3337:

Line 4387: --from bsc_sys_dim_levels_b d, bsc_sys_dim_level_rels r

4383:
4384: -- Fix bug#5079365, use level_pk_col instead of relation_col
4385: --select d.level_view_name, r.relation_col
4386: --into l_level_view_name, l_level_pk_col
4387: --from bsc_sys_dim_levels_b d, bsc_sys_dim_level_rels r
4388: --where d.dim_level_id = r.dim_level_id and
4389: -- d.level_table_name = x_level_table_name and
4390: -- r.dim_level_id = r.parent_dim_level_id;
4391: select level_view_name, level_pk_col