DBA Data[Home] [Help]

APPS.JTF_TTY_GEN_TERR_PVT dependencies on JTF_TTY_TERR_GROUPS

Line 47: TYPE g_terr_group_id_tab IS TABLE OF jtf_tty_terr_groups.terr_group_id%TYPE;

43: g_opp_qual_usg_id NUMBER;
44: g_lead_qual_usg_id NUMBER;
45:
46:
47: TYPE g_terr_group_id_tab IS TABLE OF jtf_tty_terr_groups.terr_group_id%TYPE;
48: TYPE g_terr_group_name_tab IS TABLE OF jtf_tty_terr_groups.terr_group_name%TYPE;
49: TYPE g_rank_tab IS TABLE OF jtf_tty_terr_groups.rank%TYPE;
50: TYPE g_active_from_date_tab IS TABLE OF jtf_tty_terr_groups.active_from_date%TYPE;
51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;

Line 48: TYPE g_terr_group_name_tab IS TABLE OF jtf_tty_terr_groups.terr_group_name%TYPE;

44: g_lead_qual_usg_id NUMBER;
45:
46:
47: TYPE g_terr_group_id_tab IS TABLE OF jtf_tty_terr_groups.terr_group_id%TYPE;
48: TYPE g_terr_group_name_tab IS TABLE OF jtf_tty_terr_groups.terr_group_name%TYPE;
49: TYPE g_rank_tab IS TABLE OF jtf_tty_terr_groups.rank%TYPE;
50: TYPE g_active_from_date_tab IS TABLE OF jtf_tty_terr_groups.active_from_date%TYPE;
51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;
52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;

Line 49: TYPE g_rank_tab IS TABLE OF jtf_tty_terr_groups.rank%TYPE;

45:
46:
47: TYPE g_terr_group_id_tab IS TABLE OF jtf_tty_terr_groups.terr_group_id%TYPE;
48: TYPE g_terr_group_name_tab IS TABLE OF jtf_tty_terr_groups.terr_group_name%TYPE;
49: TYPE g_rank_tab IS TABLE OF jtf_tty_terr_groups.rank%TYPE;
50: TYPE g_active_from_date_tab IS TABLE OF jtf_tty_terr_groups.active_from_date%TYPE;
51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;
52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;
53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;

Line 50: TYPE g_active_from_date_tab IS TABLE OF jtf_tty_terr_groups.active_from_date%TYPE;

46:
47: TYPE g_terr_group_id_tab IS TABLE OF jtf_tty_terr_groups.terr_group_id%TYPE;
48: TYPE g_terr_group_name_tab IS TABLE OF jtf_tty_terr_groups.terr_group_name%TYPE;
49: TYPE g_rank_tab IS TABLE OF jtf_tty_terr_groups.rank%TYPE;
50: TYPE g_active_from_date_tab IS TABLE OF jtf_tty_terr_groups.active_from_date%TYPE;
51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;
52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;
53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;
54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;

Line 51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;

47: TYPE g_terr_group_id_tab IS TABLE OF jtf_tty_terr_groups.terr_group_id%TYPE;
48: TYPE g_terr_group_name_tab IS TABLE OF jtf_tty_terr_groups.terr_group_name%TYPE;
49: TYPE g_rank_tab IS TABLE OF jtf_tty_terr_groups.rank%TYPE;
50: TYPE g_active_from_date_tab IS TABLE OF jtf_tty_terr_groups.active_from_date%TYPE;
51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;
52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;
53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;
54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;
55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;

Line 52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;

48: TYPE g_terr_group_name_tab IS TABLE OF jtf_tty_terr_groups.terr_group_name%TYPE;
49: TYPE g_rank_tab IS TABLE OF jtf_tty_terr_groups.rank%TYPE;
50: TYPE g_active_from_date_tab IS TABLE OF jtf_tty_terr_groups.active_from_date%TYPE;
51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;
52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;
53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;
54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;
55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;
56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;

Line 53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;

49: TYPE g_rank_tab IS TABLE OF jtf_tty_terr_groups.rank%TYPE;
50: TYPE g_active_from_date_tab IS TABLE OF jtf_tty_terr_groups.active_from_date%TYPE;
51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;
52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;
53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;
54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;
55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;
56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;
57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;

Line 54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;

50: TYPE g_active_from_date_tab IS TABLE OF jtf_tty_terr_groups.active_from_date%TYPE;
51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;
52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;
53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;
54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;
55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;
56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;
57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;
58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;

Line 55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;

51: TYPE g_active_to_date_tab IS TABLE OF jtf_tty_terr_groups.active_to_date%TYPE;
52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;
53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;
54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;
55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;
56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;
57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;
58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;
59: TYPE g_catch_all_resource_id_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_id%TYPE;

Line 56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;

52: TYPE g_parent_terr_id_tab IS TABLE OF jtf_tty_terr_groups.parent_terr_id%TYPE;
53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;
54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;
55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;
56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;
57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;
58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;
59: TYPE g_catch_all_resource_id_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_id%TYPE;
60: TYPE g_catch_all_resource_type_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_type%TYPE;

Line 57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;

53: TYPE g_matching_rule_code_tab IS TABLE OF jtf_tty_terr_groups.matching_rule_code%TYPE;
54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;
55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;
56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;
57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;
58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;
59: TYPE g_catch_all_resource_id_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_id%TYPE;
60: TYPE g_catch_all_resource_type_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_type%TYPE;
61: TYPE g_generate_catchall_flag_tab IS TABLE OF jtf_tty_terr_groups.generate_catchall_flag%TYPE;

Line 58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;

54: TYPE g_created_by_tab IS TABLE OF jtf_tty_terr_groups.created_by%TYPE;
55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;
56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;
57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;
58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;
59: TYPE g_catch_all_resource_id_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_id%TYPE;
60: TYPE g_catch_all_resource_type_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_type%TYPE;
61: TYPE g_generate_catchall_flag_tab IS TABLE OF jtf_tty_terr_groups.generate_catchall_flag%TYPE;
62: TYPE g_num_winners_tab IS TABLE OF jtf_tty_terr_groups.num_winners%TYPE;

Line 59: TYPE g_catch_all_resource_id_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_id%TYPE;

55: TYPE g_creation_date_tab IS TABLE OF jtf_tty_terr_groups.creation_date%TYPE;
56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;
57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;
58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;
59: TYPE g_catch_all_resource_id_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_id%TYPE;
60: TYPE g_catch_all_resource_type_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_type%TYPE;
61: TYPE g_generate_catchall_flag_tab IS TABLE OF jtf_tty_terr_groups.generate_catchall_flag%TYPE;
62: TYPE g_num_winners_tab IS TABLE OF jtf_tty_terr_groups.num_winners%TYPE;
63: TYPE g_org_id_tab IS TABLE OF jtf_terr_all.org_id%TYPE;

Line 60: TYPE g_catch_all_resource_type_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_type%TYPE;

56: TYPE g_last_updated_by_tab IS TABLE OF jtf_tty_terr_groups.last_updated_by%TYPE;
57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;
58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;
59: TYPE g_catch_all_resource_id_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_id%TYPE;
60: TYPE g_catch_all_resource_type_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_type%TYPE;
61: TYPE g_generate_catchall_flag_tab IS TABLE OF jtf_tty_terr_groups.generate_catchall_flag%TYPE;
62: TYPE g_num_winners_tab IS TABLE OF jtf_tty_terr_groups.num_winners%TYPE;
63: TYPE g_org_id_tab IS TABLE OF jtf_terr_all.org_id%TYPE;
64: TYPE g_change_type_tab IS TABLE OF jtf_tty_named_acct_changes.change_type%TYPE;

Line 61: TYPE g_generate_catchall_flag_tab IS TABLE OF jtf_tty_terr_groups.generate_catchall_flag%TYPE;

57: TYPE g_last_update_date_tab IS TABLE OF jtf_tty_terr_groups.last_update_date%TYPE;
58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;
59: TYPE g_catch_all_resource_id_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_id%TYPE;
60: TYPE g_catch_all_resource_type_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_type%TYPE;
61: TYPE g_generate_catchall_flag_tab IS TABLE OF jtf_tty_terr_groups.generate_catchall_flag%TYPE;
62: TYPE g_num_winners_tab IS TABLE OF jtf_tty_terr_groups.num_winners%TYPE;
63: TYPE g_org_id_tab IS TABLE OF jtf_terr_all.org_id%TYPE;
64: TYPE g_change_type_tab IS TABLE OF jtf_tty_named_acct_changes.change_type%TYPE;
65: TYPE g_from_where_tab IS TABLE OF jtf_tty_named_acct_changes.from_where%TYPE;

Line 62: TYPE g_num_winners_tab IS TABLE OF jtf_tty_terr_groups.num_winners%TYPE;

58: TYPE g_last_update_login_tab IS TABLE OF jtf_tty_terr_groups.last_update_login%TYPE;
59: TYPE g_catch_all_resource_id_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_id%TYPE;
60: TYPE g_catch_all_resource_type_tab IS TABLE OF jtf_tty_terr_groups.catch_all_resource_type%TYPE;
61: TYPE g_generate_catchall_flag_tab IS TABLE OF jtf_tty_terr_groups.generate_catchall_flag%TYPE;
62: TYPE g_num_winners_tab IS TABLE OF jtf_tty_terr_groups.num_winners%TYPE;
63: TYPE g_org_id_tab IS TABLE OF jtf_terr_all.org_id%TYPE;
64: TYPE g_change_type_tab IS TABLE OF jtf_tty_named_acct_changes.change_type%TYPE;
65: TYPE g_from_where_tab IS TABLE OF jtf_tty_named_acct_changes.from_where%TYPE;
66: TYPE g_terr_group_account_id_tab IS TABLE OF jtf_tty_terr_grp_accts.terr_group_account_id%TYPE;

Line 1042: jtf_tty_terr_groups tg,

1038: SELECT g.postal_code postal_code
1039: ,g.geo_id geo_id
1040: ,terr.geo_territory_id geo_territory_id
1041: FROM jtf_tty_geo_grp_values grpv,
1042: jtf_tty_terr_groups tg,
1043: jtf_tty_geo_terr terr,
1044: jtf_tty_geographies g --postal_code level
1045: WHERE terr.terr_group_id = tg.terr_group_id
1046: AND terr.terr_group_id = grpv.terr_group_id

Line 1059: jtf_tty_terr_groups tg,

1055: SELECT g.postal_code postal_code
1056: ,g.geo_id geo_id
1057: ,terr.geo_territory_id geo_territory_id
1058: FROM jtf_tty_geo_grp_values grpv,
1059: jtf_tty_terr_groups tg,
1060: jtf_tty_geo_terr terr,
1061: jtf_tty_geographies g, --postal_code level
1062: jtf_tty_geographies g1,
1063: jtf_tty_geographies g2

Line 1078: jtf_tty_terr_groups tg,

1074: SELECT g.postal_code postal_code
1075: ,g.geo_id geo_id
1076: ,terr.geo_territory_id geo_territory_id
1077: FROM jtf_tty_geo_grp_values grpv,
1078: jtf_tty_terr_groups tg,
1079: jtf_tty_geo_terr terr,
1080: jtf_tty_geographies g,
1081: jtf_tty_geographies g1
1082: WHERE terr.terr_group_id = tg.terr_group_id

Line 1128: FROM jtf_tty_terr_groups tg,

1124: UNION
1125: SELECT g.postal_code postal_code
1126: ,g.geo_id geo_id
1127: ,terr.geo_territory_id geo_territory_id
1128: FROM jtf_tty_terr_groups tg,
1129: jtf_tty_geo_terr terr,
1130: jtf_tty_geographies g,
1131: jtf_tty_geo_terr_values tv
1132: WHERE terr.terr_group_id = tg.terr_group_id

Line 2543: jtf_tty_terr_groups tg,

2539: SELECT g.postal_code postal_code
2540: ,g.geo_id geo_id
2541: ,terr.geo_territory_id geo_territory_id
2542: FROM jtf_tty_geo_grp_values grpv,
2543: jtf_tty_terr_groups tg,
2544: jtf_tty_geo_terr terr,
2545: jtf_tty_geographies g --postal_code level
2546: WHERE terr.terr_group_id = tg.terr_group_id
2547: AND terr.terr_group_id = grpv.terr_group_id

Line 2560: jtf_tty_terr_groups tg,

2556: SELECT g.postal_code postal_code
2557: ,g.geo_id geo_id
2558: ,terr.geo_territory_id geo_territory_id
2559: FROM jtf_tty_geo_grp_values grpv,
2560: jtf_tty_terr_groups tg,
2561: jtf_tty_geo_terr terr,
2562: jtf_tty_geographies g, --postal_code level
2563: jtf_tty_geographies g1,
2564: jtf_tty_geographies g2

Line 2579: jtf_tty_terr_groups tg,

2575: SELECT g.postal_code postal_code
2576: ,g.geo_id geo_id
2577: ,terr.geo_territory_id geo_territory_id
2578: FROM jtf_tty_geo_grp_values grpv,
2579: jtf_tty_terr_groups tg,
2580: jtf_tty_geo_terr terr,
2581: jtf_tty_geographies g,
2582: jtf_tty_geographies g1
2583: WHERE terr.terr_group_id = tg.terr_group_id

Line 2629: FROM jtf_tty_terr_groups tg,

2625: UNION
2626: SELECT g.postal_code postal_code
2627: ,g.geo_id geo_id
2628: ,terr.geo_territory_id geo_territory_id
2629: FROM jtf_tty_terr_groups tg,
2630: jtf_tty_geo_terr terr,
2631: jtf_tty_geographies g,
2632: jtf_tty_geo_terr_values tv
2633: WHERE terr.terr_group_id = tg.terr_group_id

Line 2897: FROM jtf_tty_terr_groups tgrp

2893:
2894: /* does Territory Group have at least 1 Geo Territory ? */
2895: SELECT COUNT(*)
2896: INTO l_na_count
2897: FROM jtf_tty_terr_groups tgrp
2898: , jtf_tty_geo_grp_values gterr
2899: WHERE tgrp.terr_group_id = gterr.terr_group_id
2900: AND tgrp.terr_group_id = p_terr_group_id(x)
2901: AND ROWNUM < 2;

Line 7570: FROM jtf_tty_terr_groups g

7566:
7567: /* does Territory Group have at least 1 Named Account? */
7568: /*SELECT COUNT(*)
7569: INTO l_na_count
7570: FROM jtf_tty_terr_groups g
7571: , jtf_tty_terr_grp_accts ga
7572: , jtf_tty_named_accts a
7573: WHERE g.terr_group_id = ga.terr_group_id
7574: AND ga.named_account_id = a.named_account_id

Line 10395: ,jtf_tty_terr_groups C

10391: ,D.org_id
10392: ,-1 * B.terr_group_id
10393: ,E.terr_id
10394: FROM jtf_tty_geo_terr B
10395: ,jtf_tty_terr_groups C
10396: ,jtf_terr_all D
10397: ,jtf_terr_all E -- to get the terr_id of the top level territory of overlay branch
10398: WHERE B.geo_territory_id = l_geo_territory_id
10399: AND B.terr_group_id = C.terr_group_id

Line 10586: ,jtf_tty_terr_groups C

10582: ,D.org_id
10583: ,-1 * B.terr_group_id
10584: ,E.terr_id
10585: FROM jtf_tty_geo_terr B
10586: ,jtf_tty_terr_groups C
10587: ,jtf_terr_all D
10588: ,jtf_terr_all E -- to get the terr_id of the top level territory of overlay branch
10589: WHERE B.geo_territory_id = l_geo_terr_id
10590: AND B.terr_group_id = C.terr_group_id

Line 10864: ,jtf_tty_terr_groups C

10860: AND A.change_type = 'UPDATE'
10861: AND A.object_type = 'NA'
10862: AND A.object_id = B.named_account_id) A
10863: ,jtf_tty_terr_grp_accts B
10864: ,jtf_tty_terr_groups C
10865: ,jtf_terr_all D -- to get the org_id of the parent territory
10866: ,jtf_terr_all E -- to get the terr_id of the top level territory of overlay branch
10867: ,jtf_terr_all F -- to get the terr_id for the placeholder territory of non-overlay branch
10868: WHERE A.terr_group_account_id = B.terr_group_account_id

Line 11141: FROM JTF_TTY_TERR_GROUPS A

11137: , A.NUM_WINNERS
11138: , B.ORG_ID
11139: , MIN(C.change_type) change_type
11140: -- if there is both insert and update to a territory group , we need to process only the insert
11141: FROM JTF_TTY_TERR_GROUPS A
11142: ,JTF_TERR_ALL B
11143: ,JTF_TTY_NAMED_ACCT_CHANGES C
11144: WHERE C.creation_date <= l_date
11145: AND C.change_type IN ('INSERT', 'UPDATE')

Line 11193: FROM JTF_TTY_TERR_GROUPS A

11189: , A.NUM_WINNERS
11190: , B.ORG_ID
11191: , MIN(C.change_type) change_type
11192: -- if there is both insert and update to a territory group , we need to process only the insert
11193: FROM JTF_TTY_TERR_GROUPS A
11194: ,JTF_TERR_ALL B
11195: ,JTF_TTY_NAMED_ACCT_CHANGES C
11196: WHERE C.creation_date <= l_date
11197: AND C.change_type IN ('INSERT', 'UPDATE')

Line 11736: FROM JTF_TTY_TERR_GROUPS A

11732: , A.generate_catchall_flag
11733: , A.NUM_WINNERS
11734: , B.ORG_ID
11735: , 'INSERT'
11736: FROM JTF_TTY_TERR_GROUPS A
11737: , JTF_TERR_ALL B
11738: WHERE a.parent_terr_id = b.terr_id
11739: AND ( a.active_to_date >= SYSDATE OR a.active_to_date IS NULL )
11740: AND a.active_from_date <= SYSDATE

Line 11759: FROM JTF_TTY_TERR_GROUPS A

11755: , A.LAST_UPDATE_LOGIN
11756: , A.NUM_WINNERS
11757: , B.ORG_ID
11758: , 'INSERT'
11759: FROM JTF_TTY_TERR_GROUPS A
11760: , JTF_TERR_ALL B
11761: WHERE a.parent_terr_id = b.terr_id
11762: AND ( a.active_to_date >= SYSDATE OR a.active_to_date IS NULL )
11763: AND a.active_from_date <= SYSDATE

Line 12175: ,jtf_tty_terr_groups C

12171: ,B.attribute14
12172: ,B.attribute15
12173: FROM
12174: jtf_tty_terr_grp_accts B
12175: ,jtf_tty_terr_groups C
12176: ,jtf_terr_all D -- to get the org_id of the parent territory
12177: ,jtf_terr_all E -- to get the terr_id of the top level territory of overlay branch
12178: ,jtf_terr_all F -- to get the terr_id for the placeholder territory of non-overlay branch
12179: WHERE B.terr_group_account_id = l_terr_grp_acct_id

Line 12404: FROM JTF_TTY_TERR_GROUPS A

12400: , A.generate_catchall_flag
12401: , A.NUM_WINNERS
12402: , B.ORG_ID
12403: , p_change_type change_type
12404: FROM JTF_TTY_TERR_GROUPS A
12405: ,JTF_TERR_ALL B
12406: ,JTF_TERR_ALL C
12407: WHERE A.parent_terr_id = B.terr_id
12408: AND B.terr_id = C.parent_territory_id

Line 12430: FROM JTF_TTY_TERR_GROUPS A

12426: , A.LAST_UPDATE_LOGIN
12427: , A.NUM_WINNERS
12428: , B.ORG_ID
12429: , p_change_type change_type
12430: FROM JTF_TTY_TERR_GROUPS A
12431: ,JTF_TERR_ALL B
12432: WHERE A.terr_group_id = l_terr_group_id
12433: AND A.parent_terr_id = B.terr_id
12434: AND A.self_service_type = 'GEOGRAPHY';