Getting error message "PLS-00428: an INTO clause is expected in this SELECT statement" with the following code:
Help! See anything I'm missing?
Code:
CREATE OR REPLACE PROCEDURE Sp_Select_Avgtimecompleted
IS
BEGIN
SELECT T_WORKTYPE, COUNT(*) AS ITEM_COUNT, TRUNC(AVG(F_TIMESTAMP - F_STARTTIME))+1 AS AVG_DAYS
FROM REPORT.BK_WOBCOMPLETEDQUEUE
WHERE TRUNC(F_TIMESTAMP) >= (TRUNC(SYSDATE) - 7)
AND TRUNC(F_TIMESTAMP) < TRUNC(SYSDATE)
GROUP BY T_WORKTYPE;
END;
Help! See anything I'm missing?