When I run the following command from a function I defined, I get the error "EXECUTE of SELECT ... INTO is not implemented." Does this mean that a particular command is not allowed (ie "SELECT ... INTO")? Or does it just mean that I am doing something wrong? The actual code causing the error is given below. I apologize if the answer is already here, however I looked and could not find this specific error. Thanks in advance ... For everything that costs, I run 8.4.7
vCommand = 'select ' || stmt.column_name || ' as id ' || ', count(*) as nCount INTO tmpResults from ' || stmt.table_name || ' WHERE ' || stmt.column_name || ' IN (select distinct primary_id from anyTable WHERE primary_id = ' || stmt.column_name || ') group by ' || stmt.column_name || ';'; EXECUTE vCommand;
source share