Arun Shastry wrote:
>
> I'm working with some stored procedures and noticed something really
> cool that Sybase/MS SQL Server have and Informix doesn't.
>
> In either one of the other DBMS's, if the last statement is a SELECT
> that returns multiple records, that would be returned to the calling
> application too. Informix returns a nasty -659 SQL error. I guess I
> could get them into a set of local variables and loop thru them, but
> the other approach would have been great.
If I understand you correctly, the last statement in the stored proc is
a syntactically incorrect (in SPL) statement but the Sybase engine will
let it get by and return its rows to the caller. But this is only
because it is the last statement before the return.
Of course, the people maintaining this procedure would *NEVER* dream of
adding code to filter, refine, or crunch the row data.
Sighhh.... I have seen many features touted as "cool" turn ugly upon
some basic analysis. Some cool features Informix truly lacks (like an
array of structure variables to be returned in one swoop) and they
deserve to have their toes toasted for it. But this, IMO, ain't one of
them. It only encourages inconsistent, error-prone coding practices.
--
-- Jake (Retrospectively realizes there is no future in hindsight)
+------------------------------------------------------------+
| The expedient performance of a task with excessive concern |
| regarding its duration-to-completion engenders a virtual |
| certainty of diminished benefit therefrom. |
| -- Benjamin Franklin (but he said it in 3 words) |
+------------------------------------------------------------+