Select against functions or procedures
Is it possible to create a stored procedure/function that returns records so that I can just call by the following query :
SELECT * FROM MyProcedure()
I know I can do this in SQL Server, but how to do this in Oracle ?
If it is impossible, what is your suggestion when you have a situation where you find queries that are duplicated across several caller and want to put them in 1 place to be reusable ?
Any help would be greatly appreciated.
Select against functions of procedures
Thanks for your suggestions.
Using Views is no option in our case since they can not accept parameters.
Calling stored proc. that returns a ref cursor needs more than 1 step which is impossible to apply because I need to put the function/stored proc in statement like Oracle MERGE.