daikaads
New member
- Joined
- Sep 6, 2017
- Messages
- 41
- Points
- 0
CREATE OR REPLACE PACKAGE film_pkg
IS
title VARCHAR2(100);
PROCEDURE get_films(fname VARCHAR2);
END film_pkg;
CREATE OR REPLACE PACKAGE BODY film_pkg
IS
PROCEDURE get_films (fname IN film.title%TYPE,
r_date OUT film.release_date%TYPE,
dur OUT film.duration%TYPE)
AS
BEGIN
SELECT release_date, duration
INTO r_date, dur
FROM FILM
WHERE title = fname;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
r_date := '';
dur := '';
END get_films;
END film_pkg;
Error(4,11): PLS-00323: subprogram or cursor 'GET_FILMS' is declared in a package specification and must be defined in the package body
IS
title VARCHAR2(100);
PROCEDURE get_films(fname VARCHAR2);
END film_pkg;
CREATE OR REPLACE PACKAGE BODY film_pkg
IS
PROCEDURE get_films (fname IN film.title%TYPE,
r_date OUT film.release_date%TYPE,
dur OUT film.duration%TYPE)
AS
BEGIN
SELECT release_date, duration
INTO r_date, dur
FROM FILM
WHERE title = fname;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
r_date := '';
dur := '';
END get_films;
END film_pkg;
Error(4,11): PLS-00323: subprogram or cursor 'GET_FILMS' is declared in a package specification and must be defined in the package body