DBA Data[Home] [Help]

APPS.JTF_TTY_GEO_TERRGP dependencies on JTF_TTY_GEOGRAPHIES

Line 323: from jtf_tty_geographies

319: IF get_terr_grp_values.geo_type = 'POSTAL_CODE'
320: THEN
321: select geo_id
322: into L_GEO_ID_FROM
323: from jtf_tty_geographies
324: where geo_type = get_terr_grp_values.geo_type
325: and geo_code = (
326: select min(geo_code)
327: from jtf_tty_geographies

Line 327: from jtf_tty_geographies

323: from jtf_tty_geographies
324: where geo_type = get_terr_grp_values.geo_type
325: and geo_code = (
326: select min(geo_code)
327: from jtf_tty_geographies
328: where geo_type = get_terr_grp_values.geo_type
329: and geo_code >= get_terr_grp_values.low_value_char
330: and geo_code <= get_terr_grp_values.high_value_char);
331:

Line 335: from jtf_tty_geographies

331:
332: Begin
333: select geo_id
334: into L_GEO_ID_TO
335: from jtf_tty_geographies
336: where geo_type = get_terr_grp_values.geo_type
337: and geo_code = (
338: select max(geo_code)
339: from jtf_tty_geographies

Line 339: from jtf_tty_geographies

335: from jtf_tty_geographies
336: where geo_type = get_terr_grp_values.geo_type
337: and geo_code = (
338: select max(geo_code)
339: from jtf_tty_geographies
340: where geo_type = get_terr_grp_values.geo_type
341: and geo_code <= get_terr_grp_values.high_value_char
342: and geo_code >= get_terr_grp_values.low_value_char);
343: EXCEPTION

Line 350: from jtf_tty_geographies

346: END;
347: ELSE -- not postal code
348: select geo_id
349: into L_GEO_ID_FROM
350: from jtf_tty_geographies
351: where geo_type = get_terr_grp_values.geo_type
352: and geo_code = get_terr_grp_values.low_value_char
353: and rownum < 2;
354:

Line 358: from jtf_tty_geographies

354:
355: Begin
356: select geo_id
357: into L_GEO_ID_TO
358: from jtf_tty_geographies
359: where geo_type = get_terr_grp_values.geo_type
360: and geo_code = get_terr_grp_values.high_value_char
361: and rownum < 2;
362: EXCEPTION

Line 767: (SELECT g.geo_id FROM jtf_tty_geographies g, jtf_tty_geo_grp_values ggv, jtf_tty_geographies g1

763: WHERE gtv.geo_territory_id IN
764: (SELECT geo_territory_id FROM jtf_tty_geo_terr
765: where terr_group_id = p_terr_gp_id)
766: AND gtv.geo_id NOT IN
767: (SELECT g.geo_id FROM jtf_tty_geographies g, jtf_tty_geo_grp_values ggv, jtf_tty_geographies g1
768: WHERE ggv.terr_group_id = p_terr_gp_id
769: AND ggv.geo_type = 'COUNTRY'
770: AND ggv.geo_id_from = g1.geo_id
771: AND g.geo_type = 'POSTAL_CODE'

Line 774: SELECT g.geo_id FROM jtf_tty_geographies g, jtf_tty_geo_grp_values ggv, jtf_tty_geographies g1

770: AND ggv.geo_id_from = g1.geo_id
771: AND g.geo_type = 'POSTAL_CODE'
772: AND g.country_code = g1.country_code
773: UNION
774: SELECT g.geo_id FROM jtf_tty_geographies g, jtf_tty_geo_grp_values ggv, jtf_tty_geographies g1
775: WHERE ggv.terr_group_id = p_terr_gp_id
776: AND ggv.geo_type = 'STATE'
777: AND ggv.geo_id_from = g1.geo_id
778: AND g.geo_type = 'POSTAL_CODE'

Line 782: SELECT g.geo_id FROM jtf_tty_geographies g, jtf_tty_geo_grp_values ggv, jtf_tty_geographies g1

778: AND g.geo_type = 'POSTAL_CODE'
779: AND g.country_code = g1.country_code
780: AND g.state_code = g1.state_code
781: UNION
782: SELECT g.geo_id FROM jtf_tty_geographies g, jtf_tty_geo_grp_values ggv, jtf_tty_geographies g1
783: WHERE ggv.terr_group_id = p_terr_gp_id
784: AND ggv.geo_type = 'PROVINCE'
785: AND ggv.geo_id_from = g1.geo_id
786: AND g.geo_type = 'POSTAL_CODE'

Line 790: SELECT g.geo_id FROM jtf_tty_geographies g, jtf_tty_geo_grp_values ggv, jtf_tty_geographies g1

786: AND g.geo_type = 'POSTAL_CODE'
787: AND g.country_code = g1.country_code
788: AND g.province_code = g1.province_code
789: UNION
790: SELECT g.geo_id FROM jtf_tty_geographies g, jtf_tty_geo_grp_values ggv, jtf_tty_geographies g1
791: WHERE ggv.terr_group_id = p_terr_gp_id
792: AND ggv.geo_type = 'CITY'
793: AND ggv.geo_id_from = g1.geo_id
794: AND g.geo_type = 'POSTAL_CODE'

Line 808: FROM jtf_tty_geographies g,

804: AND ggv.geo_type = 'POSTAL_CODE'
805: AND ggv.comparison_operator = '='
806: UNION
807: SELECT g.geo_id
808: FROM jtf_tty_geographies g,
809: jtf_tty_geo_grp_values ggv,
810: jtf_tty_geographies g1,
811: jtf_tty_geographies g2
812: WHERE ggv.terr_group_id = p_terr_gp_id

Line 810: jtf_tty_geographies g1,

806: UNION
807: SELECT g.geo_id
808: FROM jtf_tty_geographies g,
809: jtf_tty_geo_grp_values ggv,
810: jtf_tty_geographies g1,
811: jtf_tty_geographies g2
812: WHERE ggv.terr_group_id = p_terr_gp_id
813: AND ggv.geo_type = 'POSTAL_CODE'
814: AND ggv.comparison_operator = 'BETWEEN'

Line 811: jtf_tty_geographies g2

807: SELECT g.geo_id
808: FROM jtf_tty_geographies g,
809: jtf_tty_geo_grp_values ggv,
810: jtf_tty_geographies g1,
811: jtf_tty_geographies g2
812: WHERE ggv.terr_group_id = p_terr_gp_id
813: AND ggv.geo_type = 'POSTAL_CODE'
814: AND ggv.comparison_operator = 'BETWEEN'
815: AND g1.geo_id = ggv.geo_id_from