I have created an object type as:
Create or replace type t1 as object
(
Account_id varchar2(20),
Account_date date);
And wrote a function inside package body p1 that returns this object:
Function account_details(ac_id in account_table.account_id%type)
return t1 is
v_t1 t1;
Begin
Select t1(account_id,
Account_date)
Into v_t1
From account_table
Where account_id=ac_id;
Return v_t1;
End account_details;
Package compiles successfully but when I try to execute the function and get values returned by it:
Select p1.account_details(1234) from dual;
I get the output as:
[P1.t1]
How do I get the values of this object returned.This object will always have only one record returned from the function always.
Will I be able to get some help here?