PARSEADDR
Syntax
PARSEADDR (address_text, "address_token")
Description
Returns the specified address line token, from a US-style address line in the format "City, State ZipCode".
Arguments
address_text |
String from which to return address token |
address_token |
Identifier for the address token to return. Valid values are: C — City S — State Z — Zip Code |
Returns
The portion of the original address_text that corresponds to the address token.
Remarks
For consistent results, the address line must follow the US format of City, State ZipCode. For example: Manchester, NH 03104. Other formats may cause unpredictable results. If the data is not in the required format, try using PARSE.
Examples
PARSEADDR("Bedford, NH 03110", "S")
Returns: NH
PARSEADDR("New Boston, NH 03070-1245", "Z")
Returns: 03070-1245