Click or drag to resize

CREATE MERGEDLOOKUP Statement

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
CREATE MERGEDLOOKUP Statement

The CREATE MERGEDLOOKUP statement creates a merged lookup table from two or more lookup tables based on a unique key. The MERGE ON statement works the same as the CREATE LOOKUP statement; there can be any number of MERGE ON statements between BEGIN and END.

Note Note

The BEGIN and END statements are mandatory.

Syntax

Alchemy
CREATE MERGEDLOOKUP ident
BEGIN
  MERGE ON value FROM filename [WHERE expr] INDEX BY id;
  MERGE ON value FROM filename [WHERE expr] INDEX BY id;
  MERGE ON value FROM filename [WHERE expr] INDEX BY id;
  MERGE ON value FROM filename [WHERE expr] INDEX BY id;
END;

Nomenclature

identThe identifier given to this newly created lookup table
value The value to index
filenameThe path to the shapefile containing the table
expr When the WHERE statement is used, expr is one or more logical expressions used to filter the selection rows in value
idA unique identifier used as the key in the lookup table

Example

This simple example creates a merged lookup table on post (ZIP) codes using city and town as keys.

Alchemy
CREATE MERGEDLOOKUP cityFromPostcode
  BEGIN
    MERGE ON %city
    FROM "data\NewZealand"
    INDEX BY %postcode;

    MERGE ON string.tolower(%town)
    FROM "extradata\NewZealand"
    INDEX BY %pc;
  END;