Posted in 2000
Hello,
how do I execute a function in ESQL/C that gets one argument an returns
a collection?
To explan a short description of the UDR:
CREATE FUNCTION return_set( object INT)
RETURNING coll_var
DEFINE coll_var SET( INTEGER NOT NULL );
SELECT value INTO col_var
FROM ...
WHERE ... AND
attribut = object;
RETURN coll_var;
END FUNCTION
Is is then like this to execute this function in ESQL/C?
EXEC SQL BEGIN DECLARE SECTION;
CLIENT COLLECTION SET (INT NOT NULL) set_var;
EXEC SQL END DECLARE SECTION;
.
.
.
EXEC SQL
ALLOCATE COLLECTION :set_var;
EXEC SQL
execute function return_set(187132) INTO :set_var;
Thanks for your advice.
Peter Hamm
We use strictly necessary cookies to make this site work. With your consent we’d also use optional cookies for analytics and marketing. You can accept all, reject all, or choose. Read our Cookie Policy.