DBA Data[Home] [Help]

APPS.BSC_UPDATE_DIM dependencies on BSC_SYS_DIM_LEVELS_B

Line 530: FROM bsc_sys_dim_levels_b

526: h_cursor t_cursor;
527:
528: CURSOR c_dim_info (p_level_table_name VARCHAR2) IS
529: SELECT dim_level_id, level_pk_col
530: FROM bsc_sys_dim_levels_b
531: WHERE level_table_name = p_level_table_name;
532:
533: h_dim_level_id bsc_sys_dim_levels_b.dim_level_id%TYPE;
534: h_level_pk_col bsc_sys_dim_levels_b.level_pk_col%TYPE;

Line 533: h_dim_level_id bsc_sys_dim_levels_b.dim_level_id%TYPE;

529: SELECT dim_level_id, level_pk_col
530: FROM bsc_sys_dim_levels_b
531: WHERE level_table_name = p_level_table_name;
532:
533: h_dim_level_id bsc_sys_dim_levels_b.dim_level_id%TYPE;
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

Line 534: h_level_pk_col bsc_sys_dim_levels_b.level_pk_col%TYPE;

530: FROM bsc_sys_dim_levels_b
531: WHERE level_table_name = p_level_table_name;
532:
533: h_dim_level_id bsc_sys_dim_levels_b.dim_level_id%TYPE;
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

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 543: h_mn_level_pk_col bsc_sys_dim_levels_b.level_pk_col%TYPE;

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
547: FROM bsc_sys_dim_levels_b t, bsc_sys_dim_level_rels r

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 551: h_child_dim_table bsc_sys_dim_levels_b.level_table_name%TYPE;

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;
552:
553: h_condition VARCHAR2(32700);
554: h_i NUMBER;
555:

Line 929: FROM bsc_sys_dim_levels_b

925:
926: -- AW_INTEGRATION: We need to know the level_table_name given the short name
927: SELECT level_table_name
928: INTO l_level_table_name
929: FROM bsc_sys_dim_levels_b
930: WHERE short_name = l_dim_short_name;
931:
932: -- AW_INTEGRATION: We need to knowif the dimension is used by an AW indicator
933: l_dim_for_aw_kpi := Dimension_Used_In_AW_Kpi(l_level_table_name);

Line 1088: FROM bsc_sys_dim_levels_b

1084:
1085: -- AW_INTEGRATION: We need to know the level_table_name given the short name
1086: SELECT level_table_name
1087: INTO l_level_table_name
1088: FROM bsc_sys_dim_levels_b
1089: WHERE short_name = l_short_name;
1090:
1091: -- AW_INTEGRATION: We need to knowif the dimension is used by an AW indicator
1092: l_dim_for_aw_kpi := Dimension_Used_In_AW_Kpi(l_level_table_name);

Line 1261: FROM bsc_sys_dim_levels_b

1257:
1258: -- AW_INTEGRATION: We need to know the level_table_name given the short name
1259: SELECT level_table_name
1260: INTO l_level_table_name
1261: FROM bsc_sys_dim_levels_b
1262: WHERE short_name = l_dim_short_name;
1263:
1264: -- AW_INTEGRATION: We need to knowif the dimension is used by an AW indicator
1265: l_dim_for_aw_kpi := Dimension_Used_In_AW_Kpi(l_level_table_name);

Line 1399: FROM bsc_sys_dim_levels_b

1395:
1396: -- AW_INTEGRATION: We need to know the level_table_name given the short name
1397: SELECT level_table_name
1398: INTO l_level_table_name
1399: FROM bsc_sys_dim_levels_b
1400: WHERE short_name = l_short_name;
1401:
1402: -- AW_INTEGRATION: We need to knowif the dimension is used by an AW indicator
1403: l_dim_for_aw_kpi := Dimension_Used_In_AW_Kpi(l_level_table_name);

Line 1646: ' FROM bsc_sys_dim_level_cols c, bsc_sys_dim_levels_b d'||

1642:
1643: /*
1644: c_aux_fields t_cursor; -- x_dim_table, h_column_type_a
1645: c_aux_fields_sql VARCHAR2(2000) := 'SELECT c.column_name'||
1646: ' FROM bsc_sys_dim_level_cols c, bsc_sys_dim_levels_b d'||
1647: ' WHERE d.dim_level_id = c.dim_level_id AND'||
1648: ' d.level_table_name = :1 AND'||
1649: ' column_type = :2';
1650: */

Line 1653: FROM bsc_sys_dim_level_cols c, bsc_sys_dim_levels_b d

1649: ' column_type = :2';
1650: */
1651: CURSOR c_aux_fields (p_level_table_name VARCHAR2, p_column_type VARCHAR2) IS
1652: SELECT c.column_name
1653: FROM bsc_sys_dim_level_cols c, bsc_sys_dim_levels_b d
1654: WHERE d.dim_level_id = c.dim_level_id AND
1655: d.level_table_name = p_level_table_name AND
1656: column_type = p_column_type;
1657:

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 1721: ' FROM bsc_sys_dim_levels_b'||

1717:
1718: -- Get dimension id
1719: /*
1720: h_sql := 'SELECT dim_level_id'||
1721: ' FROM bsc_sys_dim_levels_b'||
1722: ' WHERE level_table_name = :1';
1723: OPEN h_cursor FOR h_sql USING x_dimension_table;
1724: FETCH h_cursor INTO h_table_id;
1725: CLOSE h_cursor;

Line 1729: FROM bsc_sys_dim_levels_b

1725: CLOSE h_cursor;
1726: */
1727: SELECT dim_level_id
1728: INTO h_table_id
1729: FROM bsc_sys_dim_levels_b
1730: WHERE level_table_name = x_dimension_table;
1731:
1732: -- Get child dimensions
1733: --OPEN c_child_dimensions FOR c_child_dimensions_sql USING h_table_id, 1;

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 1813: FROM bsc_sys_dim_levels_b

1809:
1810: BEGIN
1811: SELECT level_view_name
1812: INTO l_view_name
1813: FROM bsc_sys_dim_levels_b
1814: WHERE short_name = x_dim_short_name;
1815:
1816: RETURN l_view_name;
1817: EXCEPTION

Line 1999: ' FROM bsc_sys_dim_levels_b'||

1995:
1996: -- See if the dimension table is 1N
1997: /*
1998: h_sql := 'SELECT COUNT(*)'||
1999: ' FROM bsc_sys_dim_levels_b'||
2000: ' WHERE level_table_name = :1';
2001: OPEN h_cursor FOR h_sql USING x_dim_table;
2002: FETCH h_cursor INTO h_count;
2003: CLOSE h_cursor;

Line 2007: FROM bsc_sys_dim_levels_b

2003: CLOSE h_cursor;
2004: */
2005: SELECT COUNT(*)
2006: INTO h_count
2007: FROM bsc_sys_dim_levels_b
2008: WHERE level_table_name = x_dim_table;
2009:
2010: IF h_count > 0 THEN
2011: RETURN DIM_TABLE_TYPE_1N;

Line 2051: ' FROM bsc_sys_dim_levels_b d, bsc_sys_dim_levels_b dp,'||

2047:
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,'||

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 2065: h_parent_table bsc_sys_dim_levels_b.level_table_name%TYPE;

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:
2065: h_parent_table bsc_sys_dim_levels_b.level_table_name%TYPE;
2066: h_parent_key bsc_sys_dim_levels_b.level_pk_col%TYPE;
2067:
2068: h_num_parents NUMBER;
2069:

Line 2066: h_parent_key bsc_sys_dim_levels_b.level_pk_col%TYPE;

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:
2065: h_parent_table bsc_sys_dim_levels_b.level_table_name%TYPE;
2066: h_parent_key bsc_sys_dim_levels_b.level_pk_col%TYPE;
2067:
2068: h_num_parents NUMBER;
2069:
2070: BEGIN

Line 2106: ' FROM bsc_sys_dim_levels_b'||

2102:
2103: BEGIN
2104: /*
2105: h_sql := 'SELECT level_pk_col'||
2106: ' FROM bsc_sys_dim_levels_b'||
2107: ' WHERE level_table_name = :1';
2108: OPEN h_cursor FOR h_sql USING x_dimension_table;
2109: FETCH h_cursor INTO h_level_pk_col;
2110: CLOSE h_cursor;

Line 2114: FROM bsc_sys_dim_levels_b

2110: CLOSE h_cursor;
2111: */
2112: SELECT level_pk_col
2113: INTO h_level_pk_col
2114: FROM bsc_sys_dim_levels_b
2115: WHERE level_table_name = x_dimension_table;
2116:
2117: RETURN h_level_pk_col;
2118:

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 2194: ' FROM bsc_sys_dim_levels_b'||

2190:
2191: -- Get dimension id
2192: /*
2193: h_sql := 'SELECT dim_level_id'||
2194: ' FROM bsc_sys_dim_levels_b'||
2195: ' WHERE level_table_name = :1';
2196: OPEN h_cursor FOR h_sql USING x_dimension_table;
2197: FETCH h_cursor INTO h_table_id;
2198: CLOSE h_cursor;

Line 2202: FROM bsc_sys_dim_levels_b

2198: CLOSE h_cursor;
2199: */
2200: SELECT dim_level_id
2201: INTO h_table_id
2202: FROM bsc_sys_dim_levels_b
2203: WHERE level_table_name = x_dimension_table;
2204:
2205: -- Get parent dimensions
2206: --OPEN c_parent_dimensions FOR c_parent_dimensions_sql USING h_table_id, 1;

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 3957: FROM bsc_sys_dim_levels_b

3953:
3954: -- AW_INTEGRATION: We need to know the level_table_name given the short name
3955: SELECT level_table_name
3956: INTO l_level_table_name
3957: FROM bsc_sys_dim_levels_b
3958: WHERE short_name = x_dim_short_name;
3959:
3960: -- AW_INTEGRATION: We need to know if the dimension is used by an AW indicator
3961: l_dim_for_aw_kpi := Dimension_Used_In_AW_Kpi(l_level_table_name);

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

Line 4393: from bsc_sys_dim_levels_b

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
4392: into l_level_view_name, l_level_pk_col
4393: from bsc_sys_dim_levels_b
4394: where level_table_name = x_level_table_name;
4395:
4396: l_sql := 'select distinct code'||
4397: ' from '||l_level_view_name||

Line 4819: FROM BSC_SYS_COM_DIM_LEVELS L, BSC_SYS_DIM_LEVELS_B D

4815: l_num_bind_vars NUMBER;
4816:
4817: CURSOR c_list IS
4818: SELECT DISTINCT L.DIM_LEVEL_ID, D.LEVEL_TABLE_NAME
4819: FROM BSC_SYS_COM_DIM_LEVELS L, BSC_SYS_DIM_LEVELS_B D
4820: WHERE L.DIM_LEVEL_ID = D.DIM_LEVEL_ID;
4821:
4822: BEGIN
4823: l_num_bind_vars := 0;

Line 4829: ' FROM BSC_SYS_COM_DIM_LEVELS L, BSC_SYS_DIM_LEVELS_B D'||

4825: -- Get the dimension id and dimension table name for the dimension involved
4826: -- in any list of any tab
4827: /*
4828: h_sql := 'SELECT DISTINCT L.DIM_LEVEL_ID, D.LEVEL_TABLE_NAME'||
4829: ' FROM BSC_SYS_COM_DIM_LEVELS L, BSC_SYS_DIM_LEVELS_B D'||
4830: ' WHERE L.DIM_LEVEL_ID = D.DIM_LEVEL_ID';
4831: */
4832: --OPEN h_cursor FOR h_sql;
4833: OPEN c_list;