Subject Procedure x is not selectable. It does not contain SUSPEND statement
Author Sławek Cabaj
Hello,

Can anybody tell me what's wrong with this procedure ?

CREATE PROCEDURE PROC
RETURNS (
FIELD_1 VARCHAR(200),
FIELD_1_COUNT INTEGER)
AS
BEGIN
FOR
SELECT SKIP 1 FIELD_1,COUNT(FIELD_1) FROM TABLE_1
GROUP BY FIELD_1
ORDER BY 2 DESC
INTO :FIELD_1,:FIELD_1_COUNT
DO
BEGIN
SUSPEND;
END
END
^


When I try to use it in select statement, for instance

[...]
WHERE SOME_FIELD IN (SELECT FIELD_1 FROM PROC)

get an error: Procedure PROC is not selectable. It does not contain SUSPEND
statement.

Any hints ?

(Firebird 2.1.3)

Slawek





[Non-text portions of this message have been removed]