Procedure returning select, how?
RanieriOct 2 2012 — edited Oct 5 2012Hello,
I trying to create a procedure that just outputs a query (select) return, but when I create the procedure, I'm receiving the error PLS-00428: an INTO clause is expected in this SELECT statement. What wrong?
CREATE OR REPLACE PROCEDURE PROCESSOS_GRUPO (groupId NUMBER) AS
BEGIN
SELECT name
FROM lsw_bpd B
JOIN lsw_bpd_instance BI ON B.version_id = BI.cached_bpd_version_id
JOIN lsw_task T ON T.bpd_instance_id = BI.bpd_instance_id
WHERE T.status IN (11,12) AND BI.execution_status IN (1, 3) and ABS(T.group_id) = groupId;
END PROCESSOS_GRUPO;
I really appreciate any help