Link to home
Start Free TrialLog in
Avatar of viswapsp
viswapsp

asked on

PL/SQL tables - Ref cursors.

Hi,
I have a question.. I know we can transfer the data from a Cursor or Refcursor
into PL/SQL table(fetching one by one). What I want is the other way. Can we transfer the data from a PL/SQL table (all the columns not necessarily from a table, there can be calculated columns as well) into a Cursor/Refcursor.

Also, let me clarify this. My understanding is a Cursor/Ref cursor always holds data from one or more data base tables only. It never have values which are not from a database. Am I correct?

Let me explain the scenario, why I need this. I am developing some ASP pages, where I need to call a procedure which will return me one or more PL/SQL tables which can contain many columns. But, I think PL/SQL tables with more than one column are not supported in ASP, where as it can support Ref cursors with more than one column. So, I want to see if there is any way I can convert my PL/SQL tables into Ref cursors as they are supported by ASP.

Thanks for your time.
Viswa
ASKER CERTIFIED SOLUTION
Avatar of venkotch
venkotch

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pennnn
pennnn

Avatar of viswapsp

ASKER

Thanks venko. It is helpful. But, I looked at some Oracle links, objects have their own disadvantages like, we can not have private/protected variables which are specific to the object type body. Also, we can not have private functions specific to the object type body.
It seems we need both packages as well as object types. I thought if possible I want to avoid one or the other.

Thanks for the info.