REP-1401 [message #185634] |
Wed, 02 August 2006 15:26 |
sweetgeegee27
Messages: 107 Registered: June 2005
|
Senior Member |
|
|
function CF_OWNER_NAMEFormula return Char is
V_OWNER_NAME VARCHAR2(60);
V_PROPERTY_NO PROPERTY.PROPERTY_NO%TYPE;
cursor c_property (B_TAX_PAYER_NO IN NUMBER) is
SELECT P.PROPERTY_NO
FROM PROP_OWNER PO,
PROP_OWNERSHIP POS,
PROPERTY P
WHERE PO.TAX_PAYER_NO = B_TAX_PAYER_NO
AND POS.TAX_PAYER_NO = PO.TAX_PAYER_NO
AND P.PROPERTY_NO = POS.PROPERTY_NO
and (SYSDATE BETWEEN POS.START_DATE AND POS.END_DATE
or (SYSDATE >= POS.START_DATE AND POS.END_DATE IS NULL))
AND FL_VOID = 'N';
CURSOR C_OWNER_NAME IS
SELECT GET_NAME_FN(:TP_MAIL)
FROM DUAL;
BEGIN
OPEN C_OWNER_NAME;
FETCH C_OWNER_NAME
INTO V_OWNER_NAME;
CLOSE C_OWNER_NAME;
OPEN C_PROPERTY(:TAX_PAYER_NO);
FETCH C_PROPERTY
INTO V_PROPERTY_NO;
CLOSE C_PROPERTY;
DETERMINE_ADDRESS(:TP_MAIL, V_PROPERTY_NO,:TAX_TYPE_NO, TO_NUMBER(''), :P_TAX_PAYER_NAME,
:P_REP_NAME, :P_MAILING_ADDRESS,:P_CITY_NAME,:P_POST_CODE_DESC, :P_COUNTRY_NAME,
:p_parish_name);
RETURN (V_OWNER_NAME);
exception
when no_data_found then
return(null);
end;
Can anyone tell me what's wrong with this code. I will be happy to submit any additional information needed.
|
|
|
|