reformat_postcode_string
FUNCTION reformat_postcode_string(p_string IN VARCHAR2) RETURN VARCHAR2
Attempts to determine whether general the format the given string to match a standard postcode format
|
|
p_string
|
the string whose format is to be checked
|
|
|
a known postcode format or NULL if the string did not match a known postcode format
|
|
ANbNAA
|
e.g. M1 1AA
|
|
|
ANNbNAA
|
e.g. M60 1NW
|
|
|
AANbNAA
|
e.g. CR2 6XH
|
|
|
AANNbNAA
|
e.g. DN55 1PT
|
|
|
ANAbNAA
|
e.g. W1A 1HP
|
|
|
AANAbNAA
|
e.g. EC1A 1BB
|
|
valid_postcode_format
FUNCTION valid_postcode_format(p_postcode IN VARCHAR2) RETURN BOOLEAN
Attempts to validate that the format of the given string matches a standard postcode format
This includes the general format of the string, plus any restrictions on character values within the overall format.
|
|
p_string
|
the string whose format is to be checked
|
|
|
TRUE if the given string matches a known postcode format
|
get_region_for_postcode
FUNCTION get_region_for_postcode(p_postcode IN VARCHAR2)
RETURN postcodes.regi_code%TYPE
Find the region with which the given postcode is associated
|
|
p_postcode
|
correctly formatted postcode
|