PL/SQL (MOSC)

MOSC Banner

How do i fix this error: PLS-00302: component 'JOBNO' must be declared

in PL/SQL (MOSC) 2 commentsAnswered

When i run this code it compiles with error say that jobno must be declared, i need helpon this

CREATE OR REPLACE PROCEDURE publisher_detail IS

CURSOR publisherCursor is

SELECT publisher.publishername, city, phonenumber, COUNT(printjob.publishername) as numjob

FROM publisher, printjob

WHERE publisher.publishername = printjob.publishername

GROUP BY publisher.publishername, city, phonenumber;

tempRec publisherCursor%Rowtype;

jobNo number(3);

BEGIN

OPEN publisherCursor;

LOOP

FETCH publisherCursor INTO tempRec;

EXIT WHEN publisherCursor%NOTFOUND;

IF (tempRec.numjob < 3)

THEN

INSERT INTO publisherDetail

Values(tempRec.publisherName, tempRec.city, tempRec.phoneNumber, tempRec.numjob);

ELSE

DBMS_OUT.PUT_LINE(tempRec.publisherName||' '||temprec.jobno||' '||temprec.completionDate);

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center