I can't find:
Error(43,1) PL/SQL: SQL Statement ignored
and:
Error(43,19): PL/SQL: ORA-00947: not enough values
Please help.
CREATE OR REPLACE PACKAGE BODY TEAM_pkg AS
procedure displayInfo(tid TEAM.team_ID%type) is
dis teamrecord;
chec varchar(20);
BEGIN
SELECT tname INTO chec FROM Team
WHERE team.team_id = tid;
IF chec IS NULL then
raise team_not_found;
else
select * into dis from team where team_id = tid;
dbms_output.put_line(dis.teamid ||' '||dis.tname||' '||dis.rk||' '||dis.ct);
end if;
EXCEPTION
WHEN team_not_found THEN
Rollback; -- Oracle performs an implicit rollback once and exception is raised.
dbms_output.put_line('Team not Found!');
WHEN NO_DATA_FOUND THEN
Rollback; -- Oracle performs an implicit rollback once and exception is raised.
dbms_output.put_line('Team not Found!');
end;
team_not_found
exception that you haven't declared that would throw a compilation error.teamrecord
is also not defined-- is that a variable of typeteam%rowtype
? – Justin Caveteamrecord
type eitherteam%rowtype
, or at least a record type that exactly matches theteam
layout? If not theselect ... into dis
could get this error. But it's hard to tell with partial information. Try to get it down to the shortest procedure or block that generates the error. – Alex Pooleselect * into dis from team where team_id = tid
; why do you rollback, when you make no WRITE operations? please use identation to make your code more readable... – Pavel Gatnar