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.
Stefan Weideneder — — source: Informix-list mailing list archive (1991-1998)
Miguel Lorenzo Turbon wrote:
>
> We need to build dynamic SQL in the following stored procedure.
>
> create procedure informix.proc(tablename char(20); colname char(20))
> returning char(20);>
> define colvalue char(20);
>
> foreach
> select colname
> ^^^^^^^
> into colvalue
> from tablename
> ^^^^^^^^^
> return colvalue with resume;> end foreach
> end procedure;
>
> Is this possible? What's the correct syntax?
>
> Thanks.
Hi,
it's impossible. The only way is to form a if-else construction.
Bye.
Stefan.
stefan@weideneder.de
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.