DBA Data[Home] [Help]

APPS.JTY_TERR_ENGINE_GEN_PVT dependencies on JTF_TERR_ALL

Line 66: FROM jtf_terr_all jt

62: AND (a.rank_calc_flag <> 'N' OR a.process_attr_values_flag <> 'N' OR
63: a.matching_sql_flag <> 'N' OR a.hier_processing_flag <> 'N')
64: AND NOT EXISTS (
65: SELECT jt.terr_id
66: FROM jtf_terr_all jt
67: WHERE jt.end_date_active < sysdate
68: OR jt.start_date_active > sysdate
69: CONNECT BY PRIOR jt.parent_territory_id = jt.terr_id AND jt.terr_id <> 1
70: START WITH jt.terr_id = a.terr_id )

Line 77: FROM jtf_terr_all a

73: 'N',
74: 'D',
75: 'Y',
76: 'D'
77: FROM jtf_terr_all a
78: WHERE (a.start_date_active > sysdate
79: OR a.end_date_active < sysdate)
80: AND exists (
81: SELECT 1

Line 89: FROM jtf_terr_all

85: AND b.source_id = p_source_id);
86:
87: CURSOR c_child_terrs (cl_terr_id IN NUMBER) IS
88: SELECT terr_id
89: FROM jtf_terr_all
90: START WITH terr_id = cl_terr_id
91: CONNECT BY PRIOR terr_id = parent_territory_id;
92:
93: TYPE l_terr_id_tbl_type IS TABLE OF jty_changed_terrs.terr_id%TYPE;

Line 118: FROM jtf_terr_all a,

114: USING
115: ( SELECT
116: a.terr_id terr_id,
117: b.source_id source_id
118: FROM jtf_terr_all a,
119: jtf_terr_usgs_all b
120: WHERE a.terr_id = b.terr_id
121: AND b.source_id = p_source_id
122: AND a.start_date_active >

Line 132: FROM jtf_terr_all jt

128: AND a.start_date_active < sysdate
129: AND a.end_date_active > sysdate
130: AND NOT EXISTS (
131: SELECT jt.terr_id
132: FROM jtf_terr_all jt
133: WHERE jt.end_date_active < sysdate
134: OR jt.start_date_active > sysdate
135: CONNECT BY PRIOR jt.parent_territory_id = jt.terr_id AND jt.terr_id <> 1
136: START WITH jt.terr_id = a.terr_id ) ) S

Line 173: FROM jtf_terr_all a,

169: USING
170: ( SELECT
171: a.terr_id terr_id,
172: b.source_id source_id
173: FROM jtf_terr_all a,
174: jtf_terr_usgs_all b
175: WHERE a.terr_id = b.terr_id
176: AND b.source_id = p_source_id
177: AND a.end_date_active >

Line 309: ,jtf_terr_all b

305: ,p_terr_change_tab.start_date
306: ,p_terr_change_tab.end_date
307: FROM
308: jty_changed_terrs_gt a
309: ,jtf_terr_all b
310: ,jtf_terr_all c
311: WHERE a.terr_id = b.terr_id(+)
312: AND b.parent_territory_id = c.terr_id(+)
313: AND b.org_id = c.org_id(+);

Line 310: ,jtf_terr_all c

306: ,p_terr_change_tab.end_date
307: FROM
308: jty_changed_terrs_gt a
309: ,jtf_terr_all b
310: ,jtf_terr_all c
311: WHERE a.terr_id = b.terr_id(+)
312: AND b.parent_territory_id = c.terr_id(+)
313: AND b.org_id = c.org_id(+);
314:

Line 357: FROM jtf_terr_all jt

353: AND (a.rank_calc_flag <> 'N' OR a.process_attr_values_flag <> 'N' OR
354: a.matching_sql_flag <> 'N' OR a.hier_processing_flag <> 'N')
355: AND NOT EXISTS (
356: SELECT jt.terr_id
357: FROM jtf_terr_all jt
358: WHERE jt.end_date_active < to_date(cl_start_date,'dd-mm-rr')
359: OR jt.start_date_active > to_date(cl_end_date,'dd-mm-rr')
360: CONNECT BY PRIOR jt.parent_territory_id = jt.terr_id AND jt.terr_id <> 1
361: START WITH jt.terr_id = a.terr_id );

Line 365: FROM jtf_terr_all

361: START WITH jt.terr_id = a.terr_id );
362:
363: CURSOR c_child_terrs (cl_terr_id IN NUMBER) IS
364: SELECT terr_id
365: FROM jtf_terr_all
366: START WITH terr_id = cl_terr_id
367: CONNECT BY PRIOR terr_id = parent_territory_id;
368:
369: TYPE l_terr_id_tbl_type IS TABLE OF jty_changed_dea_terrs.terr_id%TYPE;

Line 503: ,jtf_terr_all b

499: ,p_terr_change_tab.start_date
500: ,p_terr_change_tab.end_date
501: FROM
502: jty_changed_terrs_gt a
503: ,jtf_terr_all b
504: ,jtf_terr_all c
505: WHERE a.terr_id = b.terr_id(+)
506: AND b.parent_territory_id = c.terr_id(+)
507: AND b.org_id = c.org_id(+);

Line 504: ,jtf_terr_all c

500: ,p_terr_change_tab.end_date
501: FROM
502: jty_changed_terrs_gt a
503: ,jtf_terr_all b
504: ,jtf_terr_all c
505: WHERE a.terr_id = b.terr_id(+)
506: AND b.parent_territory_id = c.terr_id(+)
507: AND b.org_id = c.org_id(+);
508:

Line 669: jtf_terr_all c

665: SELECT a.qual_relation_product
666: INTO l_qual_relation_product
667: FROM jtf_terr_qtype_usgs_all a,
668: jtf_qual_type_usgs_all b,
669: jtf_terr_all c
670: WHERE a.qual_type_usg_id = b.qual_type_usg_id
671: AND b.source_id = p_source_id
672: AND b.qual_type_id = l_qual_type_id_tbl(i)
673: AND a.terr_id = p_terr_change_tab.terr_id(j)

Line 717: jtf_terr_all c

713: SELECT a.qual_relation_product
714: INTO l_qual_relation_product
715: FROM jtf_terr_qtype_usgs_all a,
716: jtf_qual_type_usgs_all b,
717: jtf_terr_all c
718: WHERE a.qual_type_usg_id = b.qual_type_usg_id
719: AND b.source_id = p_source_id
720: AND b.qual_type_id = l_qual_type_id_tbl(i)
721: AND a.terr_id = p_terr_change_tab.terr_id(j)

Line 837: , jtf_terr_all jta1

833: ,'Y' matching_sql_flag
834: ,jta1.start_date_active start_date
835: ,jta1.end_date_active end_date
836: FROM jtf_terr_usgs_all jtu
837: , jtf_terr_all jta1
838: , jtf_terr_all jta2
839: WHERE jtu.source_id = lp_source_id
840: AND jtu.terr_id = jta1.terr_id
841: AND jta1.terr_id <> 1

Line 838: , jtf_terr_all jta2

834: ,jta1.start_date_active start_date
835: ,jta1.end_date_active end_date
836: FROM jtf_terr_usgs_all jtu
837: , jtf_terr_all jta1
838: , jtf_terr_all jta2
839: WHERE jtu.source_id = lp_source_id
840: AND jtu.terr_id = jta1.terr_id
841: AND jta1.terr_id <> 1
842: AND jta1.end_date_active >= lp_start_date

Line 849: FROM jtf_terr_all jt

845: AND ( jta1.org_id = jta2.org_id OR
846: (jta1.org_id IS NULL AND jta2.org_id IS NULL) )
847: AND NOT EXISTS (
848: SELECT /* index(JT JTF_TERR_U1) */ jt.terr_id
849: FROM jtf_terr_all jt
850: WHERE jt.end_date_active < lp_start_date
851: OR jt.start_date_active > lp_end_date
852: CONNECT BY PRIOR jt.parent_territory_id = jt.terr_id AND jt.terr_id <> 1
853: START WITH jt.terr_id = jta1.terr_id );

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

930: 'Source : ' || p_source_id || ' Mode : ' || p_mode || ' Start Date : ' || p_start_date ||
931: ' End Date : ' || p_end_date);
932:
933: /* if mode = incremental , get all the territories that need to be processed from incr_gtp */
934: /* if mode = total , get all the active territories , as of sysdate, from jtf_terr_all */
935: /* if mode = date effective , get all the active territories , between p_start_date and p_end_date, from jtf_terr_all */
936: IF (p_mode = 'INCREMENTAL') THEN
937: BEGIN
938: SELECT count(*)

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

931: ' End Date : ' || p_end_date);
932:
933: /* if mode = incremental , get all the territories that need to be processed from incr_gtp */
934: /* if mode = total , get all the active territories , as of sysdate, from jtf_terr_all */
935: /* if mode = date effective , get all the active territories , between p_start_date and p_end_date, from jtf_terr_all */
936: IF (p_mode = 'INCREMENTAL') THEN
937: BEGIN
938: SELECT count(*)
939: INTO l_count

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

1137:
1138: -- Update theabsolute rank in jtf_terr_denorm_rules_all for all service territories when the STAR is run for Service.
1139: IF (p_source_id = -1002) THEN
1140: UPDATE jtf_terr_denorm_rules_all jtda
1141: SET absolute_rank = ( select absolute_rank from jtf_terr_all jta where jta.terr_id = jtda.terr_id)
1142: where jtda.source_id = -1002;
1143: END IF;
1144:
1145: IF ( p_source_id = -1002 ) THEN

Line 1183: /* Following procedure call has been added to set the geo_flag value in jtf_terr_all table

1179: 'No territories processed');
1180:
1181: END IF; /* IF (l_no_of_records > 0) */
1182:
1183: /* Following procedure call has been added to set the geo_flag value in jtf_terr_all table
1184: based on wether a territory has geographical qualifiers or not */
1185: /*
1186: JTY_TERR_MAP_PVT.set_terr_geo_flag ( p_source_id => p_source_id,
1187: p_mode => p_mode,