问题
from my .NET application I have to invoke an Oracle pipelined table function. Do I need to map the Oracle UDTs (object and table) and to add a parameter for the table object to the ADO.NET Command object, or should I use a Data Reader?
I know that I have to map the Oracle UDTs to .NET classes when I want to pass a table to Oracle procedure. Can I use the same method to invoke a pipelined function? Or should I specify in my ADO.NET Command the Text "SELECT * FROM TABLE(myFunction(...))" and use a Data Reader for every row?
Thanx in advance!
回答1:
The easiest will be to use SELECT * FROM ..., however the SQL that would work in all versions of Oracle maybe like this:
SELECT * FROM TABLE(CAST(myFunction(...) AS functionReturnType))
来源:https://stackoverflow.com/questions/9606327/how-to-call-oracle-table-function-pipelined-function-from-net