1
次のPL/SQLコードをOracle 11g XEに実行しようとしています。私が見る限り、コードに何も問題はありませんが、オラクルはエラーを出しています。解決する方法がわかりません。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
これが役立つかどうかは不明です。 http://stackoverflow.com/questions/3382833/ora-00972-identifier-is-too-long-while-creating-tablespace –
@Benもちろん、テーブルスキーマとデータ – Brian