Subject no current row for fetch operation
Author Dmitry Kuzmenko
Hello, All!

I don't know was it discussed or not. If yes, sorry.
The question is:

I have stored procedure, returning only one row. Maybe more than one row.
This procedure is selective, i.e. it has SUSPEND in it's body.
I'm executing query:

SELECT T.*, SP.*
FROM TABLE T, PROC(T.ID) SP

This shows error message:
"no current record for fetch operation"

But if I add WHERE clause
where T.ID = SP.ID

All will be fine.

Why engine can't fetch rows from SP in first case, and do it in second?

I know that SELECT in the first case must return multiplication of T and SP
records. But if SP returns only one row it can be very useful to write SPs
to convert or manipulate data instead of creating UDF.

--
Dmitry Kuzmenko, Epsylon Technologies.