Discussion:
Function to return a table
(too old to reply)
Dorian C. Chalom
2007-08-11 17:24:58 UTC
Permalink
Hopefully I am posting this in the right location not to upset anyone...

What would be the best way to return from a function a subset or records
from a table?

Thank you!
Jack Jackson
2007-08-11 18:19:59 UTC
Permalink
On Sat, 11 Aug 2007 13:24:58 -0400, "Dorian C. Chalom"
Post by Dorian C. Chalom
Hopefully I am posting this in the right location not to upset anyone...
What would be the best way to return from a function a subset or records
from a table?
I would probably use a cursor.

SELECT ... FROM ... INTO CURSOR ...

or

CREATE CURSOR ...
INSERT INTO ...

I would either pass in the name of the cursor to use, or have the
function generate a cursor name with SYS(2015) and return the name.
Dorian C. Chalom
2007-08-11 18:35:39 UTC
Permalink
THANK YOU!
Post by Jack Jackson
On Sat, 11 Aug 2007 13:24:58 -0400, "Dorian C. Chalom"
Post by Dorian C. Chalom
Hopefully I am posting this in the right location not to upset anyone...
What would be the best way to return from a function a subset or records
from a table?
I would probably use a cursor.
SELECT ... FROM ... INTO CURSOR ...
or
CREATE CURSOR ...
INSERT INTO ...
I would either pass in the name of the cursor to use, or have the
function generate a cursor name with SYS(2015) and return the name.
Loading...