This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
You may be confusing a function with a procedure. If you have an operation with a FROM clause that requires a rowset be retrieved from a table/tables, then you create a function that you call from your select statement.
Ok, firstly I know I can do this with a cursor, just loop through the contents of a select cusror and then call the required stored procedure from within the loop, passing in the values from the fetch statement.
Problem is cursors are not the quickest in Sybase (it's different in Informix and Oracle). So therefore I was wanting to try to perform this within a select statement.
Yes, quite happy with calling various functions abs(..), datediff(..) within the select resultset - I was trying to find if anyone had ever used a stored procedure instead of a function. The problem I think will be the way in which the procedure passes parameters back. One option I can think of is to wrap the procedure call with a function call...
Joined: Oct 06, 2007
by function I meant a user defined function wrapped in your own package (which would contain the cursor logic.