PostgreSQL ERROR: EXECUTE of SELECT ... INTO is not implemented
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 the
specific command is not allowed (i.e. "SELECT ...INTO")? Or does it just
mean I'm doing something wrong? The actual code causing the error is
below. I apologize if the answer is already out here, however I looked and
could not find this specific error. Thanks in advance... For whatever it's
worth I'm running 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;
No comments:
Post a Comment