DBA Data[Home] [Help]

APPS.HZ_ELOCATION_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 124

  PROCEDURE update_geo_location (
    p_location_id   IN        NUMBER,
    p_geo           IN        mdsys.sdo_geometry,
    p_geo_status    IN        VARCHAR2,
    x_count         IN OUT NOCOPY    NUMBER,
    x_return_status IN OUT NOCOPY    VARCHAR2,
    x_msg_count     IN OUT NOCOPY    NUMBER,
    x_msg_data      IN OUT NOCOPY    VARCHAR2
  ) IS
    l_rowid          VARCHAR2(1000);
Line: 136

      SELECT rowid
      FROM   hz_locations
      WHERE  location_id = p_location_id;
Line: 141

	hz_utility_v2pub.debug(p_message=>'hz_locations_pkg.update_geo_location for location_id :'||
					  TO_CHAR(p_location_id)||'(+)',
	                       p_prefix=>l_debug_prefix,
			       p_msg_level=>fnd_log.level_procedure);
Line: 160

	hz_utility_v2pub.debug(p_message=>'hz_locations_pkg.update_row for location_id :' ||
					  TO_CHAR(p_location_id)||'(+)',
	                       p_prefix=>l_debug_prefix,
			       p_msg_level=>fnd_log.level_procedure);
Line: 165

      hz_locations_pkg.update_row (
        x_rowid                          => l_rowid,
        x_location_id                    => p_location_id,
        x_attribute_category             => NULL,
        x_attribute1                     => NULL,
        x_attribute2                     => NULL,
        x_attribute3                     => NULL,
        x_attribute4                     => NULL,
        x_attribute5                     => NULL,
        x_attribute6                     => NULL,
        x_attribute7                     => NULL,
        x_attribute8                     => NULL,
        x_attribute9                     => NULL,
        x_attribute10                    => NULL,
        x_attribute11                    => NULL,
        x_attribute12                    => NULL,
        x_attribute13                    => NULL,
        x_attribute14                    => NULL,
        x_attribute15                    => NULL,
        x_attribute16                    => NULL,
        x_attribute17                    => NULL,
        x_attribute18                    => NULL,
        x_attribute19                    => NULL,
        x_attribute20                    => NULL,
        x_orig_system_reference          => NULL,
        x_country                        => NULL,
        x_address1                       => NULL,
        x_address2                       => NULL,
        x_address3                       => NULL,
        x_address4                       => NULL,
        x_city                           => NULL,
        x_postal_code                    => NULL,
        x_state                          => NULL,
        x_province                       => NULL,
        x_county                         => NULL,
        x_address_key                    => NULL,
        x_address_style                  => NULL,
        x_validated_flag                 => NULL,
        x_address_lines_phonetic         => NULL,
        x_po_box_number                  => NULL,
        x_house_number                   => NULL,
        x_street_suffix                  => NULL,
        x_street                         => NULL,
        x_street_number                  => NULL,
        x_floor                          => NULL,
        x_suite                          => NULL,
        x_postal_plus4_code              => NULL,
        x_position                       => NULL,
        x_location_directions            => NULL,
        x_address_effective_date         => NULL,
        x_address_expiration_date        => NULL,
        x_clli_code                      => NULL,
        x_language                       => NULL,
        x_short_description              => NULL,
        x_description                    => NULL,
        x_content_source_type            => NULL,
        x_loc_hierarchy_id               => NULL,
        x_sales_tax_geocode              => NULL,
        x_sales_tax_inside_city_limits   => NULL,
        x_fa_location_id                 => NULL,
        x_geometry                       => p_geo,
        x_geometry_status_code           => p_geo_status,
        x_object_version_number          => NULL,
        x_timezone_id                    => NULL,
        x_created_by_module              => NULL,
        x_application_id                 => NULL,
	--3326341.
	x_delivery_point_code            => NULL
	);
Line: 238

	   hz_utility_v2pub.debug(p_message=>'Location successfully updated for location_id :'||TO_CHAR(p_location_id),
			          p_prefix =>l_debug_prefix,
			          p_msg_level=>fnd_log.level_statement);
Line: 243

	hz_utility_v2pub.debug(p_message=>'hz_locations_pkg.update_row for location_id :' ||
					   TO_CHAR(p_location_id)||'(-)',
	                       p_prefix=>l_debug_prefix,
			       p_msg_level=>fnd_log.level_procedure);
Line: 251

        fnd_message.set_name('AR','HZ_LOCATION_UPDATED');
Line: 264

	hz_utility_v2pub.debug(p_message=>'hz_locations_pkg.update_geo_location for location_id :'
					  || TO_CHAR(p_location_id)||'(-)',
	                       p_prefix=>l_debug_prefix,
			       p_msg_level=>fnd_log.level_procedure);
Line: 269

  END update_geo_location;
Line: 287

  PROCEDURE update_geometry (
    errbuf            OUT NOCOPY VARCHAR2,
    retcode           OUT NOCOPY VARCHAR2,
    p_loc_type	      IN  VARCHAR2 DEFAULT 'P',
    p_site_use_type   IN  VARCHAR2 DEFAULT NULL,
    p_country         IN  VARCHAR2 DEFAULT NULL,
    p_iden_addr_only  IN  VARCHAR2 DEFAULT 'N',
    p_incremental     IN  VARCHAR2 DEFAULT 'N',
    p_all_partial     IN  VARCHAR2 DEFAULT 'ALL',
    p_nb_row_update   IN  VARCHAR2 DEFAULT 'ALL',
    p_nb_row          IN  NUMBER   DEFAULT 20,
    p_nb_try          IN  NUMBER   DEFAULT 3

  ) IS
    TYPE locationlist IS TABLE OF hz_locations.location_id%TYPE;
Line: 326

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  EXISTS (SELECT 1
                     FROM  hz_party_site_uses hpsu,
                           hz_party_sites     hps
                     WHERE hpsu.site_use_type = p_site_use_type
                     AND hpsu.party_site_id = hps.party_site_id
                     AND hps.identifying_address_flag = DECODE(p_iden_addr_only, 'Y', 'Y', hps.identifying_address_flag)
                     AND hps.location_id = hl.location_id)
      AND NVL(hl.request_id, -1) <> NVL(p_request_id, -2);
Line: 344

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  EXISTS (SELECT 1
                     FROM  hz_party_site_uses hpsu,
                           hz_party_sites     hps
                     WHERE hpsu.site_use_type = p_site_use_type
                     AND hpsu.party_site_id = hps.party_site_id
                     AND hps.identifying_address_flag = DECODE(p_iden_addr_only, 'Y', 'Y', hps.identifying_address_flag)
                     AND hps.location_id = hl.location_id)
      AND hl.country = p_country
      AND NVL(hl.request_id, -1) <> NVL(p_request_id, -2);
Line: 362

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  EXISTS (SELECT 1
                     FROM  hz_party_site_uses hpsu,
                           hz_party_sites     hps
                     WHERE hpsu.site_use_type = p_site_use_type
                     AND hpsu.party_site_id = hps.party_site_id
                     AND hps.identifying_address_flag = DECODE(p_iden_addr_only, 'Y', 'Y', hps.identifying_address_flag)
                     AND hps.location_id = hl.location_id)
      AND NVL(hl.request_id, -1) <> NVL(p_request_id, -2)
      AND (hl.geometry_status_code = 'DIRTY' OR hl.geometry_status_code IS NULL);
Line: 380

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  EXISTS (SELECT 1
                     FROM  hz_party_site_uses hpsu,
                           hz_party_sites     hps
                     WHERE hpsu.site_use_type = p_site_use_type
                     AND hpsu.party_site_id = hps.party_site_id
                     AND hps.identifying_address_flag = DECODE(p_iden_addr_only, 'Y', 'Y', hps.identifying_address_flag)
                     AND hps.location_id = hl.location_id)
      AND hl.country = p_country
      AND NVL(hl.request_id, -1) <> NVL(p_request_id, -2)
      AND (hl.geometry_status_code = 'DIRTY' OR hl.geometry_status_code IS NULL);
Line: 399

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  EXISTS (SELECT 1
                     FROM  hz_party_sites hps
                     WHERE hps.identifying_address_flag = DECODE(p_iden_addr_only, 'Y', 'Y', hps.identifying_address_flag)
                     AND hps.location_id = hl.location_id)
      AND NVL(hl.request_id, -1) <> NVL(p_request_id, -2);
Line: 413

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  EXISTS (SELECT 1
                     FROM  hz_party_sites hps
                     WHERE hps.identifying_address_flag = DECODE(p_iden_addr_only, 'Y', 'Y', hps.identifying_address_flag)
                     AND hps.location_id = hl.location_id)
      AND hl.country = p_country
      AND NVL(hl.request_id, -1) <> NVL(p_request_id, -2);
Line: 427

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  EXISTS (SELECT 1
                     FROM  hz_party_sites hps
                     WHERE hps.identifying_address_flag = DECODE(p_iden_addr_only, 'Y', 'Y', hps.identifying_address_flag)
                     AND hps.location_id = hl.location_id)
      AND NVL(hl.request_id, -1) <> NVL(p_request_id, -2)
      AND (hl.geometry_status_code = 'DIRTY' OR hl.geometry_status_code IS NULL);
Line: 442

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  EXISTS (SELECT 1
                     FROM  hz_party_sites hps
                     WHERE hps.identifying_address_flag = DECODE(p_iden_addr_only, 'Y', 'Y', hps.identifying_address_flag)
                     AND hps.location_id = hl.location_id)
      AND hl.country = p_country
      AND NVL(hl.request_id, -1) <> NVL(p_request_id, -2)
      AND (hl.geometry_status_code = 'DIRTY' OR hl.geometry_status_code IS NULL);
Line: 457

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  NVL(hl.request_id, -1) <> NVL(p_request_id, -2)
      AND    NOT EXISTS (SELECT 1
                         FROM HZ_PARTY_SITES hps
                         WHERE hps.location_id = hl.location_id );
Line: 469

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  hl.country = p_country
      AND    NVL(hl.request_id, -1) <> NVL(p_request_id, -2)
      AND    NOT EXISTS (SELECT 1
                         FROM HZ_PARTY_SITES hps
                         WHERE hps.location_id = hl.location_id );
Line: 482

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  NVL(hl.request_id, -1) <> NVL(p_request_id, -2)
      AND    (hl.geometry_status_code = 'DIRTY' OR hl.geometry_status_code IS NULL)
      AND    NOT EXISTS (SELECT 1
                         FROM HZ_PARTY_SITES hps
                         WHERE hps.location_id = hl.location_id );
Line: 495

      SELECT hl.location_id, hl.address1, hl.address2, hl.address3, hl.address4,
             hl.city, hl.postal_code, hl.state, hl.country, hl.county, hl.province
      FROM   hz_locations hl
      WHERE  hl.country = p_country
      AND    NVL(hl.request_id, -1) <> NVL(p_request_id, -2)
      AND    (hl.geometry_status_code = 'DIRTY' OR hl.geometry_status_code IS NULL)
      AND    NOT EXISTS (SELECT 1
                         FROM HZ_PARTY_SITES hps
                         WHERE hps.location_id = hl.location_id );
Line: 515

    cpt_update        NUMBER := 0;
Line: 516

    l_nb_row_update   NUMBER DEFAULT NULL;
Line: 517

    l_nb_update       NUMBER;
Line: 541

    l_nb_update := 0;
Line: 545

	hz_utility_v2pub.debug(p_message=>g_pkg_name||'.update_geometry (+)',
	                       p_prefix=>l_debug_prefix,
			       p_msg_level=>fnd_log.level_procedure);
Line: 574

      IF p_nb_row_update IS NULL OR p_nb_row_update = 'ALL' THEN
        l_nb_row_update := 1000;
Line: 577

        l_nb_row_update := TO_NUMBER(p_nb_row_update);
Line: 579

      IF l_nb_row_update IS NULL OR l_nb_row_update <= 0 THEN
        time_put_line('At least one row error.');
Line: 1268

      IF p_all_partial <> 'ALL' AND cpt_update >= l_nb_row_update THEN
        time_put_line('Exiting because partial=' || p_all_partial);
Line: 1270

        time_put_line('cpt_update=' || cpt_update);
Line: 1271

        time_put_line('nb_row_update=' || l_nb_row_update);
Line: 1276

	   hz_utility_v2pub.debug(p_message=>'cpt_update=' || cpt_update,
	                       p_prefix=>'WARNING',
			       p_msg_level=>fnd_log.level_exception);
Line: 1279

	   hz_utility_v2pub.debug(p_message=>'nb_row_update=' || l_nb_row_update,
	                       p_prefix=>'WARNING',
			       p_msg_level=>fnd_log.level_exception);
Line: 1288

        cpt_update := cpt_update + 1;
Line: 1318

           OR (p_all_partial <> 'ALL' AND cpt_update >= l_nb_row_update)
        THEN
          -- Process the records in the array.
          hz_geocode_pkg.get_spatial_coords(
            p_loc_array            => l_array,
            p_name                 => NULL,
            p_http_ad              => l_http_ad,
            p_proxy                => l_proxy,
            p_port                 => l_port,
            p_retry                => l_nb_retries,
            x_return_status        => l_return_status,
            x_msg_count            => x_msg_count,
            x_msg_data             => x_msg_data
          );
Line: 1399

            l_array.DELETE;
Line: 1416

            update_geo_location(
              p_location_id   => l_array(j).location_id,
              p_geo           => l_array(j).geometry,
              p_geo_status    => l_array(j).geometry_status_code,
              x_count         => l_nb_update,
              x_return_status => l_return_status,
              x_msg_count     => x_msg_count,
              x_msg_data      => x_msg_data
            );
Line: 1428

          l_array.DELETE;
Line: 1433

        IF p_all_partial <> 'ALL' AND cpt_update >= l_nb_row_update THEN
          time_put_line('Exiting due to update limit.');
Line: 1436

	     hz_utility_v2pub.debug(p_message=>'Exiting due to update limit.',
	                       p_prefix=>'WARNING',
			       p_msg_level=>fnd_log.level_exception);
Line: 1506

      l_location_ids.DELETE;
Line: 1507

      l_address1s.DELETE;
Line: 1508

      l_address2s.DELETE;
Line: 1509

      l_address3s.DELETE;
Line: 1510

      l_address4s.DELETE;
Line: 1511

      l_cities.DELETE;
Line: 1512

      l_postal_codes.DELETE;
Line: 1513

      l_counties.DELETE;
Line: 1514

      l_states.DELETE;
Line: 1515

      l_provinces.DELETE;
Line: 1516

      l_countries.DELETE;
Line: 1627

	hz_utility_v2pub.debug(p_message=>g_pkg_name||'.update_geometry (-)',
	                       p_prefix=>l_debug_prefix,
			       p_msg_level=>fnd_log.level_procedure);
Line: 1645

	    hz_utility_v2pub.debug(p_message=>g_pkg_name ||'.update_geometry (- expect_http_ad)',
	                           p_prefix=>'ERROR',
			           p_msg_level=>fnd_log.level_error);
Line: 1664

	    hz_utility_v2pub.debug(p_message=>g_pkg_name||'.update_geometry (- port_number)',
	                           p_prefix=>'ERROR',
			           p_msg_level=>fnd_log.level_error);
Line: 1682

	    hz_utility_v2pub.debug(p_message=>g_pkg_name||'.update_geometry (- nlsnumexp)',
	                           p_prefix=>'ERROR',
			           p_msg_level=>fnd_log.level_error);
Line: 1700

	    hz_utility_v2pub.debug(p_message=>g_pkg_name ||'.update_geometry (- atleastonerow)',
	                           p_prefix=>'ERROR',
			           p_msg_level=>fnd_log.level_error);
Line: 1719

	    hz_utility_v2pub.debug(p_message=>g_pkg_name ||'.update_geometry (- morethanmaxrow)',
	                           p_prefix=>'ERROR',
			           p_msg_level=>fnd_log.level_error);
Line: 1735

	    hz_utility_v2pub.debug(p_message=>g_pkg_name||'.update_geometry (- exchttp)',
	                           p_prefix=>'ERROR',
			           p_msg_level=>fnd_log.level_error);
Line: 1747

	    hz_utility_v2pub.debug(p_message=>g_pkg_name||'.update_geometry (- others)',
	                           p_prefix=>'SQL ERROR',
			           p_msg_level=>fnd_log.level_error);
Line: 1757

  END update_geometry;
Line: 1804

           SELECT status, domidx_opstatus
           FROM   sys.all_indexes
           WHERE  index_name = 'HZ_LOCATIONS_N15' and owner = x_index_owner;
Line: 1809

           SELECT object_owner, object_name, policy_name
           FROM   sys.all_policies
           WHERE  enable LIKE 'Y%'
           AND object_name = 'HZ_LOCATIONS';
Line: 1815

           SELECT object_owner, object_name, policy_name
           FROM   sys.dba_policies
           WHERE  enable = 'YES'
           AND object_owner = l_schema
           AND object_name = 'HZ_LOCATIONS';
Line: 1853

/*          x_del_meta :=  'Delete user_sdo_geom_metadata
                          Where  table_name = ''HZ_LOCATIONS''
                            And  column_name= ''GEOMETRY''';
Line: 1857

          x_del_meta :=  'Delete MDSYS.SDO_GEOM_METADATA_TABLE
                          Where  sdo_table_name = ''HZ_LOCATIONS''
                            AND  sdo_column_name= ''GEOMETRY''
	                    AND  sdo_owner      = '''||x_index_owner||'''';
Line: 1865

/*          x_ins_meta :=  'INSERT INTO user_sdo_geom_metadata (
                          table_name, column_name, diminfo, srid ) VALUES (
                         ''HZ_LOCATIONS'', ''GEOMETRY'',
                           mdsys.sdo_dim_array(
                           mdsys.sdo_dim_element(''longitude'', -180, 180, 0.00005),
                           mdsys.sdo_dim_element(''latitude'', -90, 90, 0.00005)), 8307 )';
Line: 1872

          x_ins_meta :=  'INSERT INTO MDSYS.SDO_GEOM_METADATA_TABLE (
                          sdo_owner, sdo_table_name, sdo_column_name, sdo_diminfo, sdo_srid ) VALUES ('''
						  ||x_index_owner||''', '||
                         '''HZ_LOCATIONS'', ''GEOMETRY'',
                           mdsys.sdo_dim_array(
                           mdsys.sdo_dim_element(''longitude'', -180, 180, 0.00005),
                           mdsys.sdo_dim_element(''latitude'', -90, 90, 0.00005)), 8307 )';
Line: 1942

  l_owners.DELETE;
Line: 1943

  l_objects.DELETE;
Line: 1944

  l_policies.DELETE;