Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Peter Hamm — — source: Informix-list mailing list archive (1991-1998)
Hi,
is it possible to create a dynamic statement in a function like this:
CREATE FUNCTION find ( db char(30), where_clause varchar )
RETURNING SET(INTEGER NOT NULL)
DEFINE foundVar SET (INTEGER NOT NULL);
DEFINE tab_db CHAR(30);
DEFINE pred VARCHAR;
SELECT oid INTO foundVar
FROM tab_db = db
WHERE pred = where_clause;
RETURN foundVar;
END FUNCTION;
Does anybody know how I can create a dynamic statement within a routine?
Thanks for your advice.
peter
Your privacy choices
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.