Home » SQL & PL/SQL » SQL & PL/SQL » PLS-00382: expression is of wrong type (Oracle 9i)
PLS-00382: expression is of wrong type [message #359359] Sat, 15 November 2008 03:15 Go to next message
rakutly
Messages: 6
Registered: November 2008
Location: Saudi Arabia
Junior Member
Dear all,
I am posting a message in forum for the first time.

I am getting one error "PLS-00382: expression is of wrong type" while executing a procedure. This is the way I tried.
/* Formatted on 2008/11/15 11:28 (Formatter Plus v4.8.6) */
DECLARE
   p_agreementid_record      finlea.staff_finnone_service.agreement_array_record@test10g.world;
   p_error_no             NUMBER;
   p_error_desc           NUMBER;
BEGIN
   finlea.staff_finnone_service.get_loan_id_status@test10g.world 
                                                      ('01008520072400',
                                                        p_agreementid_record,
                                                        p_error_no,
                                                        p_error_desc
                                                       );
   DBMS_OUTPUT.put_line (p_agreementid_record.agreementid);
END;
------------------------------------------------------
This is the package specification.

CREATE OR REPLACE PACKAGE Staff_finnone_service 
AS 

TYPE repay_record IS RECORD 
( 
Instlnum                  Number( 8 ), 
repayment_date_g          Date, 
repayment_amount          Number(16,2), 
repayment_paid_to_date    Number(16,2), 
principal_amount          Number(16,2), 
principal_paid_to_date    Number(16,2), 
interest_amount           Number(16,2), 
interest_paid_to_date     Number(16,2), 
Balance_Prin              Number(16,2) 
); 
TYPE repay_array_record IS REF CURSOR RETURN repay_record; 

TYPE agreement_record IS RECORD 
( 
Agreementid               Number( 8 ), 
Status                    Varchar2( 8 ), 
outstanding_balance       Number(16,2), 
EMI                       Number(16,2) 
); 
TYPE agreement_array_record IS REF CURSOR RETURN agreement_record; 


PROCEDURE get_installments_details 
( 
p_finnone_agreementid      IN   Number, 
p_repay_details            OUT  repay_array_record, 
p_error_no                   OUT  NUMBER, 
p_error_desc               OUT  VARCHAR2 
); 

PROCEDURE get_Outstanding_Balance 
( 
p_finnone_agreementid      IN   Number, 
p_outstanding_balance      OUT  Number, 
p_error_no                   OUT  NUMBER, 
p_error_desc               OUT  VARCHAR2 
); 


PROCEDURE get_Loan_ID_Status 
( 
p_Settlement_Account       IN   VARCHAR2, 
p_Agreementid_record       OUT  agreement_array_record, 
p_error_no                   OUT  NUMBER, 
p_error_desc               OUT  VARCHAR2 
); 

END Staff_finnone_service; 
/ 


I have only execution rights for the package.

Please help me out in getting the out put of the procedure get_Loan_ID_Status.

Thanks in advance.


[Mod-edit: Frank added [code]-tags to improve readability]

[Updated on: Sat, 15 November 2008 03:42] by Moderator

Report message to a moderator

Re: PLS-00382: expression is of wrong type [message #359361 is a reply to message #359359] Sat, 15 November 2008 03:43 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Well, you haven't populated your variables, all you have done is declare them.
Re: PLS-00382: expression is of wrong type [message #359363 is a reply to message #359359] Sat, 15 November 2008 03:45 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Please show the complete stacktrace by posting a copy-paste of an execution in sqlplus.
Re: PLS-00382: expression is of wrong type [message #360711 is a reply to message #359361] Sun, 23 November 2008 01:20 Go to previous messageGo to next message
rakutly
Messages: 6
Registered: November 2008
Location: Saudi Arabia
Junior Member
Hi,
Can you please explain me where I went wrong. You mentioned I have not populated, can you explain me how to do that..

Thanks In Advance

Regards
Rakesh
Re: PLS-00382: expression is of wrong type [message #360712 is a reply to message #360711] Sun, 23 November 2008 01:26 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The most important point is:
Frank wrote on Sat, 15 November 2008 10:45
Please show the complete stacktrace by posting a copy-paste of an execution in sqlplus.

So do it.

Regards
Michel
Re: PLS-00382: expression is of wrong type [message #360728 is a reply to message #359359] Sun, 23 November 2008 10:07 Go to previous message
Barbara Boehmer
Messages: 8625
Registered: November 2002
Location: California, USA
Senior Member
In your pl/sql block you have declared p_error_desc as NUMBER. You need to changed that to VARCHAR2 to match the type of p_error_desc in the get_loan_id_status procedure.
Previous Topic: Need help to find Business day number of the month (merged)
Next Topic: Howto Initialize collection containing collection?
Goto Forum:
  


Current Time: Sun Dec 04 04:52:30 CST 2016

Total time taken to generate the page: 0.09603 seconds