Re: using a select.
Posted in 1997
Jonathan Leffler wrote:
>
> >Date: Tue, 28 Jan 1997 15:31:50 +0100
> >From: Keith bugeja <keith.bugeja@magnet.mt>
> >X-Informix-List-Id: <list.12850>
> >
>>does anyone know if it is possible to get the name of the columns of
>>a table using the 'execute procedure' to execute a procedure that
>>contains a select statement.
>
> No, it isn't. I'm assuming that you have something like:
>
> CREATE PROCEDURE FetchIt() RETURNING INT, CHAR(30), ...;> DEFINE i INT, j CHAR(30), ...;
> FOREACH SELECT * INTO i, j, ... FROM SomeTable
> RETURN i, j, ... WITH RESUME;
> END FOREACH;
> END PROCEDURE;
>
> The return columns are all designated '(expression)' by the DESCRIBE
> statement.
>
> Yours,
> Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
Jonathan,
I personally entered a feature request for this, but it was worded
somthing like "Allow display label names for return values from a stored
procedure". My real goal was to be able to create a view based on a call
to a stored procedure, but IMO allowing display labels on the return
columns would have been a good idea even if one could not create a view.
Hmm... Is there a way (outside of SPL) to use the return values from SPL
to create/fill a temp table? (execute procedure yowza() into temp yutz)?
Gotta try that some day!
I don't think that request is going anywhere. The ANSI strait-jacket
sure puts a damper on ideas. :-(
--
-- Jake (Informix's favorite feature request vampyr)
. .
_..-'( )`-.._
./'. '||\\\\. }\\_/{ .//||` .`\\.
./'.|'.'||||\\\\|.. )o o( ..|//||||`.`|.`\\.
./'..|'.|| |||||\\`````` \\'@'/ ''''''/||||| ||.`|..`\\.
./'.||'.|||| ||||||||||||. | .|||||||||||| ||||.`||.`\\.
/'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\\
'.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.`
'.||| ||||||||| |/' ``\\||`` | ''||/'' `\\| ||||||||| |||.`
|/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\|
V V V }' `\\ /' `{ V V V
\\ \\ \\ V / / /
+-----------------------------------------------------------+
| Impeccable Logic: A thought process which successfully |
| resists chicken bites |
+-----------------------------------------------------------+