GIS_GEOCODE_ADDR_POSTAL: Geocoding an Address Line and Postal Code

How to:

GIS_GEOCODE_ADDR_POSTAL uses a GIS geocoding service to obtain the geometry point for an address line, postal code and optional country. The returned value is a fixed length alphanumeric format, large enough to hold the JSON describing the geographic location (for example, A200).

Note: This function uses GIS services and requires an Esri ArcGIS adapter connection with named credentials.

Syntax: How to Geocode an Address Line and Postal Code

GIS_GEOCODE_ADDR_POSTAL( street_addr, postal_code [, country])

where:

street_addr

fixed length alphanumeric

Is the street address to be geocoded.

postal_code

fixed length alphanumeric

Is the postal code associated with the street address.

country

fixed length alphanumeric

Is a country name, which is optional if the country is the United States.

Example: Geocoding a Street Address and Postal Code

The following request geocodes a street address using GIS_GEOCODE_ADDR_POSTAL.

DEFINE FILE WF_RETAIL_LITE
GEOCODE1/A200 = GIS_GEOCODE_ADDR_POSTAL(ADDRESS_LINE_1, POSTAL_CODE); 
END
TABLE FILE WF_RETAIL_LITE
PRINT ADDRESS_LINE_1 AS Address GEOCODE1
BY POSTAL_CODE AS Zip
WHERE CITY_NAME EQ 'New York'
WHERE POSTAL_CODE FROM '10013' TO '10020'
ON TABLE SET PAGE NOPAGE
END

The output is shown in the following image.