return object type from Oracle package function

return object type from Oracle package function

Postby rolechka » Thu 05 May 2005 21:54

There are types that is defined in Oracle database. Package function return value that have object type.

I have to call this function from dbExpress components (I think about TSQLStoredProc). But I don't have any idea how can I do this :(
Other functions that I have to execute return collection. I don't know how to return these collections.

I searched in web and in crlab site and didn't find anything :(

I give you one example.
Function from package:
--------------------------------------------------------------------------------------------------------------
create or replace package number_utl
is

function get_interval(p_begin number, p_end number) return NUM_INTERVAL_T;
...
end;
--------------------------------------------------------------------------------------------------------------
NUM_INTERVAL_T - is table of an objects that have fields, constructor and functions.

Can I call this function using dbExpress components?
If yes - help me with some information, may be links.

It is very importamt for me.

Thank you.
rolechka
 
Posts: 1
Joined: Thu 05 May 2005 21:40

Postby Paul » Fri 06 May 2005 07:32

You cannot work with nested tables in dbExpress directly. By you can write query

"select cast( get_interval(1,1) as NUM_INTERVAL ) from dual"
or
"select * from table( cast( get_interval(1,1) as NUM_INTERVAL ) )"

for the following function
function get_interval(p_begin number, p_end number) return NUM_INTERVAL PIPELINED
Paul
 
Posts: 725
Joined: Thu 28 Oct 2004 14:06


Return to dbExpress driver for Oracle