Hi,
We have a procedure that is time-consuming, which returns 4 variables as out parameters:
procedure calc_values(id in number, val1 out number, val2 out number, val3 out number, val4 out number) is
The id uniquely identifies an product in our database.
I would like to use this in a query (or view), in the form
select s.id, val1, val2, val3, val4 from something s, product_table p
where s.id = p.id
I have tried the following approach, but I am kinda stuck
* define a type
* define a table of this type
* write a wrapper function that calls this procedure and returns the results as a table
* pivot the table into columns
* join this with the product table
It feels like I am on the wrong track, i am having trouble to get the id from the product table back into the wrapper function.
Is there a better approach to this? I am on oracle 10g
Thanks!
Rob