1
我試圖在Oracle 11g XE中運行以下PL/SQL代碼。就我所見,代碼沒有問題,但是,Oracle給了我錯誤 - 我不知道如何解決這些錯誤。在Oracle 11g Express Edition中運行PL/SQL代碼 - 錯誤
declare
bookIsbn BookTitle.Isbn%type;
bookName BookTitle.btName%type;
numOfCopies number;
procedure getTotalLoans(
getbookIsbn in BookTitle.Isbn%type,
getbookName out BookTitle.btName%type,
getnumOfCopies out number) is
begin
SELECT BookTitle.btName, COUNT(BookCopy.isbn)
INTO getbookName, getnumOfCopies
FROM BookTitle, BookCopy, Loan
WHERE getBookIsbn = BookCopy.isbn
AND BookTitle.isbn = BookCopy.isbn
AND BookCopy.bcId = Loan.bcId
AND loan.dateback is null
GROUP BY BookTitle.btName, BookTitle.isbn;
end;
begin
--main block
getTotalLoans (4,bookName,numOfCopies);
dbms_output.put_line('Book Name' || bookName || ' Number of copies on loan: ' || numOfCopies);
end;
/
而且我得到以下錯誤:
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00114: identifier 'BOOKISBNƒƒƒƒƒƒƒƒBOOKTI' too long
ORA-06550: line 2, column 34:
PLS-00103: Encountered the symbol "." when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp interval date binary national charact
ORA-06550: line 3, column 1:
PLS-00114: identifier 'BOOKNAMEƒƒƒƒƒƒƒƒBOOKTI' too long
ORA-06550: line 3, column 34:
PLS-00103: Encountered the symbol "." when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp interval date binary national charact
ORA-06550: line 4, column 1:
PLS-00114: identifier 'NUMOFCOPIESƒƒƒƒƒƒƒƒNUM' too long
ORA-06550: line 4, column 34:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
constant exception <an identifier>
<a double-quoted delimited-identifier> table long double ref
char time timestamp
任何幫助,將不勝感激。
謝謝!
是你所有的代碼嗎? – Ben 2012-01-09 21:10:37
不知道這是否有幫助。 http://stackoverflow.com/questions/3382833/ora-00972-identifier-is-too-long-while-creating-tablespace – 2012-01-09 21:12:05
@Ben除了表架構和數據當然 – Brian 2012-01-09 21:14:17