I think that if you are using the Create or Replace syntax, you can not use Declare. Declare is only for anonymous blocks that are not named. So either remove line 1 and create an anonymous block, or remove line 2 and create a named procedure.
Code:
CREATE OR REPLACE PROCEDURE "FYP"."TEST" is
DECLARE
CURSOR c_test IS
SELECT name
FROM fyp.location
WHERE name like "ho%";
v_name fyp.location.name%TYPE;
v_count BINARY_INTEGER:=0;
BEGIN
OPEN c_test;
LOOP
FETCH c_test INTO v_name;
EXIT WHEN c_test%NOT_FOUND;
v_count := v_count + 1;
END LOOP;
CLOSE c_test;
END;
Bookmarks