Files
mip/Documentation/pldoc/V_PARTY_RELATIONSHIPS.html
hardya 7311d92835 Seed/enst.ctl - add INVALID status
Documentation/Design/DatabaseItemToFunctionalSpecificationReference.xls - add rule O-M5
Documentation/pldoc - regenerated
Modules/mip_helper_special_cases.pck - make reference to Tripartite rule O-M5 (handled by mip_quotation.pck and mip_tripartite.pck
Schema - removed DATA_ITEM_ROLES_IMPORT, added views of enquiries and quote statuses

git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@3354 248e525c-4dfb-0310-94bc-949c084e9493
2008-01-22 17:59:56 +00:00

228 lines
5.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="plsqldoc.css">
<TITLE>View V_PARTY_RELATIONSHIPS</TITLE>
<META name="object" content="VIEW">
<META name="name" content="V_PARTY_RELATIONSHIPS">
<META name="description" content="">
<META name="columns" content="FROM_PARL_PRTY_ID FROM_RT_CODE TO_PARL_PRTY_ID TO_RT_CODE DESCRIPTION EFFECTIVE_START EFFECTIVE_END">
</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">View V_PARTY_RELATIONSHIPS</P>
</TD></TR></TABLE>
<HR>
<A NAME="Columns"></A>
<TABLE CLASS="SUB_TABLE"><TR><TD CLASS="SUB_TITLE">
Columns
</TD></TR></TABLE>
<TABLE CLASS="SIMPLE_TABLE">
<TR>
<TD VALIGN="TOP" CLASS="LIST_ITEM"><U>
Name
</U>
</TD>
<TD VALIGN="TOP" CLASS="LIST_ITEM"><U>
Type
</U>
</TD>
<TD VALIGN="TOP" CLASS="LIST_ITEM"><U>
Optional
</U>
</TD>
<TD VALIGN="TOP" CLASS="LIST_ITEM"><U>
Default
</U>
</TD>
<TD VALIGN="TOP" CLASS="LIST_ITEM"><U>
<A HREF="V_CURRENT_CONTACT_MECHANISMS.html">Comments</A>
</U>
</TD>
</TR>
<TR>
<TD VALIGN="TOP" CLASS="LIST_ITEM">
FROM_PARL_PRTY_ID
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
NUMBER
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
</TR>
<TR>
<TD VALIGN="TOP" CLASS="LIST_ITEM">
FROM_RT_CODE
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
VARCHAR2(80)
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
</TR>
<TR>
<TD VALIGN="TOP" CLASS="LIST_ITEM">
TO_PARL_PRTY_ID
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
NUMBER
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
</TR>
<TR>
<TD VALIGN="TOP" CLASS="LIST_ITEM">
TO_RT_CODE
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
VARCHAR2(80)
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
</TR>
<TR>
<TD VALIGN="TOP" CLASS="LIST_ITEM">
<A HREF="ROLE_TYPES.html">DESCRIPTION</A>
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
VARCHAR2(80)
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
Y
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
</TR>
<TR>
<TD VALIGN="TOP" CLASS="LIST_ITEM">
EFFECTIVE_START
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
DATE
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
Y
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
</TR>
<TR>
<TD VALIGN="TOP" CLASS="LIST_ITEM">
EFFECTIVE_END
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
DATE
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
Y
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
<TD VALIGN="TOP" CLASS="DESC_TEXT">
&nbsp;
</TD>
</TR>
</TABLE>
<HR>
<A NAME="SQL"></A>
<TABLE CLASS="SUB_TABLE"><TR><TD CLASS="SUB_TITLE">
SQL
</TD></TR></TABLE><PRE CLASS="DECL_TEXT">
CREATE OR REPLACE VIEW V_PARTY_RELATIONSHIPS AS
SELECT from_parl.prty_id AS from_parl_prty_id
,prtp.from_rt_code
,to_parl.prty_id AS to_parl_prty_id
,prtp.to_rt_code
,prtp.description
,greatest(from_parl.start_date
,prel.start_date
,to_parl.start_date) AS effective_start
,least(nvl(from_parl.end_date
,to_date('31-dec-2099'
,'dd-mon-yyyy'))
,nvl(to_parl.end_date
,to_date('31-dec-2099'
,'dd-mon-yyyy'))
,nvl(prel.end_date
,to_date('31-dec-2099'
,'dd-mon-yyyy'))) AS effective_end
FROM (SELECT prty.first_name
,prty.last_name
,prty.username
,parl.prty_id
,parl.rt_code
,parl.id
,parl.start_date
,parl.end_date
FROM parties prty
,party_roles parl
WHERE parl.prty_id = prty.id) from_parl
,(SELECT prty.first_name
,prty.last_name
,prty.username
,parl.prty_id
,parl.rt_code
,parl.id
,parl.start_date
,parl.end_date
FROM parties prty
,party_roles parl
WHERE parl.prty_id = prty.id) to_parl
,party_relationship_types prtp
,party_relationships prel
WHERE prel.from_parl_id = from_parl.id
AND prel.from_parl_prty_id = from_parl.prty_id
AND prel.from_parl_rt_code = from_parl.rt_code
AND prel.to_parl_id = to_parl.id
AND prel.to_parl_prty_id = to_parl.prty_id
AND prel.to_parl_rt_code = to_parl.rt_code
AND prtp.from_rt_code = prel.from_parl_rt_code
AND prtp.to_rt_code = prel.to_parl_rt_code;
</PRE>
<P>&nbsp;</P>
<P>&nbsp;</P>
</BODY>
</HTML>