Replaced Access_Controls with APEX_AUTHORISATION Created POSTCODES, ERROR_LOGS and SYSTEM_CONFIGURATION. Added missing columns to ENQUIRIES, REGULATORS, etc. Added views V_PROFILE_RT_CODE_FOR_ENRO.vw, V_PARTY_RELATIONSHIPS.vw, V_LATEST_RT_CODE_FOR_ENRO.vw. Modules: Added cout_err.pck, cout_system_configuration.pck. Data: Added Data/Demo files Added Data/Seed files for postcodes, regions and DatabaseItemToFunctionalSpecificationReference.csv Documentation: Added Documentation/pldoc for plsqldoc-generated files. Added Documentation/SupportingDocumentation/Regions to hold region definition information. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2890 248e525c-4dfb-0310-94bc-949c084e9493
215 lines
5.9 KiB
HTML
215 lines
5.9 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<LINK REL="STYLESHEET" TYPE="text/css" HREF="plsqldoc.css">
|
|
<TITLE>Package body mip_regions</TITLE>
|
|
<META name="object" content="PACKAGE BODY">
|
|
<META name="name" content="mip_regions">
|
|
<META name="description" content="">
|
|
</HEAD>
|
|
<BODY>
|
|
<TABLE WIDTH="100%"><TR>
|
|
<TD><P ALIGN="LEFT"><STRONG><SMALL></SMALL></STRONG></TD>
|
|
<TD><P ALIGN="RIGHT"><STRONG><SMALL><A HREF="index.html">index</A></SMALL></STRONG></TD>
|
|
</TR></TABLE>
|
|
<TABLE CLASS="MAIN_TABLE"><TR><TD CLASS="DESC_TEXT">
|
|
<P CLASS="MAIN_TITLE">Package body mip_regions</P>
|
|
|
|
<BR>
|
|
</TD></TR></TABLE>
|
|
<HR>
|
|
<A NAME="Program units"></A>
|
|
<TABLE CLASS="SUB_TABLE"><TR><TD CLASS="SUB_TITLE">
|
|
Program units
|
|
</TD></TR></TABLE>
|
|
<TABLE CLASS="SUB_TABLE">
|
|
<TR><TD VALIGN="TOP" CLASS="TYPE_ITEM">
|
|
<A HREF="#reformat_postcode_string">reformat_postcode_string</A>
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
Attempts to determine whether general the format the given string to match a standard postcode format
|
|
</TD></TR>
|
|
<TR><TD VALIGN="TOP" CLASS="TYPE_ITEM">
|
|
<A HREF="#valid_postcode_format">valid_postcode_format</A>
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
Attempts to validate that the format of the given string matches a standard postcode format
|
|
</TD></TR>
|
|
<TR><TD VALIGN="TOP" CLASS="TYPE_ITEM">
|
|
<A HREF="#get_region_for_postcode">get_region_for_postcode</A>
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
Find the region with which the given postcode is associated
|
|
</TD></TR>
|
|
</TABLE>
|
|
<BR>
|
|
<HR>
|
|
<A NAME="reformat_postcode_string"></A>
|
|
<P CLASS="TYPE_TITLE">
|
|
reformat_postcode_string
|
|
</P>
|
|
<PRE CLASS="DECL_TEXT">
|
|
FUNCTION reformat_postcode_string(p_string IN VARCHAR2) RETURN VARCHAR2
|
|
|
|
</PRE>
|
|
<P CLASS="DESC_TEXT">
|
|
Attempts to determine whether general the format the given string to match a standard postcode format<br>
|
|
|
|
<BR>
|
|
</P>
|
|
<A NAME="Parameters"></A>
|
|
<TABLE CLASS="LIST_TABLE"><TR><TD CLASS="LIST_TITLE">
|
|
Parameters
|
|
</TD></TR></TABLE>
|
|
<TABLE CLASS="LIST_TABLE">
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
p_string
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
the string whose format is to be checked<br>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
<BR>
|
|
<A NAME="Returns"></A>
|
|
<TABLE CLASS="LIST_TABLE"><TR><TD CLASS="LIST_TITLE">
|
|
Returns
|
|
</TD></TR></TABLE>
|
|
<TABLE CLASS="LIST_TABLE">
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
a known postcode format or NULL if the string did not match a known postcode format<br>
|
|
|
|
<TABLE CLASS="LIST_TABLE">
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
ANbNAA
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
e.g. M1 1AA<br>
|
|
|
|
</TD></TR>
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
ANNbNAA
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
e.g. M60 1NW<br>
|
|
|
|
</TD></TR>
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
AANbNAA
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
e.g. CR2 6XH<br>
|
|
|
|
</TD></TR>
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
AANNbNAA
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
e.g. DN55 1PT<br>
|
|
|
|
</TD></TR>
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
ANAbNAA
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
e.g. W1A 1HP<br>
|
|
|
|
</TD></TR>
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
AANAbNAA
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
e.g. EC1A 1BB<br>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
<BR>
|
|
</TD></TR>
|
|
</TABLE>
|
|
<BR>
|
|
<HR>
|
|
<A NAME="valid_postcode_format"></A>
|
|
<P CLASS="TYPE_TITLE">
|
|
valid_postcode_format
|
|
</P>
|
|
<PRE CLASS="DECL_TEXT">
|
|
FUNCTION valid_postcode_format(p_postcode IN VARCHAR2) RETURN BOOLEAN
|
|
|
|
</PRE>
|
|
<P CLASS="DESC_TEXT">
|
|
Attempts to validate that the format of the given string matches a standard postcode format<br>
|
|
<br>
|
|
This includes the general format of the string, plus any restrictions on character values within the overall format.<br>
|
|
|
|
<BR>
|
|
</P>
|
|
<A NAME="Parameters"></A>
|
|
<TABLE CLASS="LIST_TABLE"><TR><TD CLASS="LIST_TITLE">
|
|
Parameters
|
|
</TD></TR></TABLE>
|
|
<TABLE CLASS="LIST_TABLE">
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
p_string
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
the string whose format is to be checked<br>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
<BR>
|
|
<A NAME="Returns"></A>
|
|
<TABLE CLASS="LIST_TABLE"><TR><TD CLASS="LIST_TITLE">
|
|
Returns
|
|
</TD></TR></TABLE>
|
|
<TABLE CLASS="LIST_TABLE">
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
TRUE if the given string matches a known postcode format<br>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
<BR>
|
|
<HR>
|
|
<A NAME="get_region_for_postcode"></A>
|
|
<P CLASS="TYPE_TITLE">
|
|
get_region_for_postcode
|
|
</P>
|
|
<PRE CLASS="DECL_TEXT">
|
|
FUNCTION get_region_for_postcode(p_postcode IN VARCHAR2)
|
|
RETURN postcodes.regi_code%TYPE
|
|
|
|
</PRE>
|
|
<P CLASS="DESC_TEXT">
|
|
Find the region with which the given postcode is associated<br>
|
|
|
|
<BR>
|
|
</P>
|
|
<A NAME="Parameters"></A>
|
|
<TABLE CLASS="LIST_TABLE"><TR><TD CLASS="LIST_TITLE">
|
|
Parameters
|
|
</TD></TR></TABLE>
|
|
<TABLE CLASS="LIST_TABLE">
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
p_postcode
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
correctly formatted postcode<br>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
<BR>
|
|
<A NAME="Returns"></A>
|
|
<TABLE CLASS="LIST_TABLE"><TR><TD CLASS="LIST_TITLE">
|
|
Returns
|
|
</TD></TR></TABLE>
|
|
<TABLE CLASS="LIST_TABLE">
|
|
<TR><TD VALIGN="TOP" CLASS="LIST_ITEM" WIDTH=1%>
|
|
</TD><TD CLASS="DESC_TEXT" WIDTH=95%>
|
|
region code<br>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
<BR>
|
|
<P> </P>
|
|
<P> </P>
|
|
</BODY>
|
|
</HTML>
|