Oninit Logo
The Down System Specialists
+1-913-674-0360
+44-2081-337529
Partnerships Contact
Finderr

-659 INTO TEMP table required for SELECT statement.

A SELECT statement did not specify where to put the returned values. SELECT statements within a procedure require either an INTO TEMP clause or an INTO clause that references the appropriate procedural variables.

Example of error:

CREATE PROCEDURE testproc() ... SELECT col1, col2 FROM tab; -- error END PROCEDURE

Correction:

CREATE PROCEDURE testproc() ... SELECT col1, col2 INTO var1, var2 FROM tab; SELECT col1, col2 FROM tab INTO TEMP another_table; END PROCEDURE