0
votes

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;
1
select * into dis from team where team_id = tid;OldProgrammer
Your error occurs on line 43 but the code you posted has no line 43. What line does the error occur on? You're catching a 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 type team%rowtype?Justin Cave
my code is too long to post, the exception is handled, yes teamrecord is variable of type. actually the error moves from line to line. Like if i delete the block where the error is at, then it appear somewhere elsejFreezy C
But is the teamrecord type either team%rowtype, or at least a record type that exactly matches the team layout? If not the select ... 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 Poole
you can save 1 select when you get all values instead of tname only select * 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

1 Answers

0
votes

You are missing END of PACKAGE BODY.