DBA Data[Home] [Help]

APPS.JTY_TERR_ENGINE_GEN_PVT dependencies on JTF_TERR_ALL

Line 54: FROM jtf_terr_all jt

50: AND (a.rank_calc_flag <> 'N' OR a.process_attr_values_flag <> 'N' OR
51: a.matching_sql_flag <> 'N' OR a.hier_processing_flag <> 'N')
52: AND NOT EXISTS (
53: SELECT jt.terr_id
54: FROM jtf_terr_all jt
55: WHERE jt.end_date_active < sysdate
56: OR jt.start_date_active > sysdate
57: CONNECT BY PRIOR jt.parent_territory_id = jt.terr_id AND jt.terr_id <> 1
58: START WITH jt.terr_id = a.terr_id )

Line 65: FROM jtf_terr_all a

61: 'N',
62: 'D',
63: 'Y',
64: 'D'
65: FROM jtf_terr_all a
66: WHERE (a.start_date_active > sysdate
67: OR a.end_date_active < sysdate)
68: AND exists (
69: SELECT 1

Line 77: FROM jtf_terr_all

73: AND b.source_id = p_source_id);
74:
75: CURSOR c_child_terrs (cl_terr_id IN NUMBER) IS
76: SELECT terr_id
77: FROM jtf_terr_all
78: START WITH terr_id = cl_terr_id
79: CONNECT BY PRIOR terr_id = parent_territory_id;
80:
81: TYPE l_terr_id_tbl_type IS TABLE OF jty_changed_terrs.terr_id%TYPE;

Line 108: FROM jtf_terr_all a,

104: USING
105: ( SELECT
106: a.terr_id terr_id,
107: b.source_id source_id
108: FROM jtf_terr_all a,
109: jtf_terr_usgs_all b
110: WHERE a.terr_id = b.terr_id
111: AND b.source_id = p_source_id
112: AND a.start_date_active >

Line 122: FROM jtf_terr_all jt

118: AND a.start_date_active < sysdate
119: AND a.end_date_active > sysdate
120: AND NOT EXISTS (
121: SELECT jt.terr_id
122: FROM jtf_terr_all jt
123: WHERE jt.end_date_active < sysdate
124: OR jt.start_date_active > sysdate
125: CONNECT BY PRIOR jt.parent_territory_id = jt.terr_id AND jt.terr_id <> 1
126: START WITH jt.terr_id = a.terr_id ) ) S

Line 163: FROM jtf_terr_all a,

159: USING
160: ( SELECT
161: a.terr_id terr_id,
162: b.source_id source_id
163: FROM jtf_terr_all a,
164: jtf_terr_usgs_all b
165: WHERE a.terr_id = b.terr_id
166: AND b.source_id = p_source_id
167: AND a.end_date_active >

Line 299: ,jtf_terr_all b

295: ,p_terr_change_tab.start_date
296: ,p_terr_change_tab.end_date
297: FROM
298: jty_changed_terrs_gt a
299: ,jtf_terr_all b
300: ,jtf_terr_all c
301: WHERE a.terr_id = b.terr_id(+)
302: AND b.parent_territory_id = c.terr_id(+)
303: AND b.org_id = c.org_id(+);

Line 300: ,jtf_terr_all c

296: ,p_terr_change_tab.end_date
297: FROM
298: jty_changed_terrs_gt a
299: ,jtf_terr_all b
300: ,jtf_terr_all c
301: WHERE a.terr_id = b.terr_id(+)
302: AND b.parent_territory_id = c.terr_id(+)
303: AND b.org_id = c.org_id(+);
304:

Line 473: jtf_terr_all c

469: SELECT a.qual_relation_product
470: INTO l_qual_relation_product
471: FROM jtf_terr_qtype_usgs_all a,
472: jtf_qual_type_usgs_all b,
473: jtf_terr_all c
474: WHERE a.qual_type_usg_id = b.qual_type_usg_id
475: AND b.source_id = p_source_id
476: AND b.qual_type_id = l_qual_type_id_tbl(i)
477: AND a.terr_id = p_terr_change_tab.terr_id(j)

Line 600: , jtf_terr_all jta1

596: ,'Y' matching_sql_flag
597: ,jta1.start_date_active start_date
598: ,jta1.end_date_active end_date
599: FROM jtf_terr_usgs_all jtu
600: , jtf_terr_all jta1
601: , jtf_terr_all jta2
602: WHERE jtu.source_id = lp_source_id
603: AND jtu.terr_id = jta1.terr_id
604: AND jta1.terr_id <> 1

Line 601: , jtf_terr_all jta2

597: ,jta1.start_date_active start_date
598: ,jta1.end_date_active end_date
599: FROM jtf_terr_usgs_all jtu
600: , jtf_terr_all jta1
601: , jtf_terr_all jta2
602: WHERE jtu.source_id = lp_source_id
603: AND jtu.terr_id = jta1.terr_id
604: AND jta1.terr_id <> 1
605: AND jta1.end_date_active >= lp_start_date

Line 612: FROM jtf_terr_all jt

608: AND ( jta1.org_id = jta2.org_id OR
609: (jta1.org_id IS NULL AND jta2.org_id IS NULL) )
610: AND NOT EXISTS (
611: SELECT jt.terr_id
612: FROM jtf_terr_all jt
613: WHERE jt.end_date_active < lp_start_date
614: OR jt.start_date_active > lp_end_date
615: CONNECT BY PRIOR jt.parent_territory_id = jt.terr_id AND jt.terr_id <> 1
616: START WITH jt.terr_id = jta1.terr_id );

Line 681: /* if mode = total , get all the active territories , as of sysdate, from jtf_terr_all */

677: ' End Date : ' || p_end_date);
678: END IF;
679:
680: /* if mode = incremental , get all the territories that need to be processed from incr_gtp */
681: /* if mode = total , get all the active territories , as of sysdate, from jtf_terr_all */
682: /* if mode = date effective , get all the active territories , between p_start_date and p_end_date, from jtf_terr_all */
683: IF (p_mode = 'INCREMENTAL') THEN
684: BEGIN
685: SELECT count(*)

Line 682: /* if mode = date effective , get all the active territories , between p_start_date and p_end_date, from jtf_terr_all */

678: END IF;
679:
680: /* if mode = incremental , get all the territories that need to be processed from incr_gtp */
681: /* if mode = total , get all the active territories , as of sysdate, from jtf_terr_all */
682: /* if mode = date effective , get all the active territories , between p_start_date and p_end_date, from jtf_terr_all */
683: IF (p_mode = 'INCREMENTAL') THEN
684: BEGIN
685: SELECT count(*)
686: INTO l_count

Line 863: SET absolute_rank = ( select absolute_rank from jtf_terr_all jta where jta.terr_id = jtda.terr_id)

859:
860: -- Update theabsolute rank in jtf_terr_denorm_rules_all for all service territories when the STAR is run for Service.
861: IF (p_source_id = -1002) THEN
862: UPDATE jtf_terr_denorm_rules_all jtda
863: SET absolute_rank = ( select absolute_rank from jtf_terr_all jta where jta.terr_id = jtda.terr_id)
864: where jtda.source_id = -1002;
865: END IF;
866:
867: IF ( p_source_id = -1002 ) THEN