Can someone help me put my pl/sql procedure in a package? I've tried and I'm struggling with it.

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
 

Mike001

New member
Joined
Apr 27, 2016
Messages
578
Points
0
I will try to help you with this but I need to know what framework you are using with this procedure.

I am familiar with many of the frameworks out there, but looking at your procedure it appears to be a mix of a couple of different frameworks with no real procedural structure.

If you can send me some more information on what you are trying to accomplish I will try to assist you.
 
Latest threads
Replies
0
Views
590
Replies
2
Views
789
Recommended threads
Replies
19
Views
10,659
Aby
Replies
10
Views
6,917
Replies
3
Views
1,488

Referral contests

Referral link for :

Sponsors

Popular tags

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top