Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 2.03 KB  |  hits: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Running PL/SQL code into Oracle 11g Express Edition - Error
  2. declare
  3. bookIsbn        BookTitle.Isbn%type;
  4. bookName        BookTitle.btName%type;
  5. numOfCopies        number;
  6.  
  7. procedure getTotalLoans(
  8. getbookIsbn            in    BookTitle.Isbn%type,
  9. getbookName            out    BookTitle.btName%type,
  10. getnumOfCopies        out    number) is
  11.     begin
  12.     SELECT BookTitle.btName, COUNT(BookCopy.isbn)
  13.     INTO getbookName, getnumOfCopies
  14.     FROM BookTitle, BookCopy, Loan
  15.     WHERE getBookIsbn = BookCopy.isbn
  16.     AND BookTitle.isbn = BookCopy.isbn
  17.     AND BookCopy.bcId = Loan.bcId
  18.     AND loan.dateback is null
  19.     GROUP BY BookTitle.btName, BookTitle.isbn;
  20.     end;
  21.  
  22. begin
  23. --main block
  24. getTotalLoans (4,bookName,numOfCopies);
  25.     dbms_output.put_line('Book Name' || bookName || ' Number of copies on loan: ' || numOfCopies);
  26. end;
  27. /
  28.        
  29. ERROR at line 2:
  30. ORA-06550: line 2, column 1:
  31. PLS-00114: identifier 'BOOKISBNƒƒƒƒƒƒƒƒBOOKTI' too long
  32. ORA-06550: line 2, column 34:
  33. PLS-00103: Encountered the symbol "." when expecting one of the following:
  34. constant exception <an identifier>
  35. <a double-quoted delimited-identifier> table long double ref
  36. char time timestamp interval date binary national charact
  37. ORA-06550: line 3, column 1:
  38. PLS-00114: identifier 'BOOKNAMEƒƒƒƒƒƒƒƒBOOKTI' too long
  39. ORA-06550: line 3, column 34:
  40. PLS-00103: Encountered the symbol "." when expecting one of the following:
  41. constant exception <an identifier>
  42. <a double-quoted delimited-identifier> table long double ref
  43. char time timestamp interval date binary national charact
  44. ORA-06550: line 4, column 1:
  45. PLS-00114: identifier 'NUMOFCOPIESƒƒƒƒƒƒƒƒNUM' too long
  46. ORA-06550: line 4, column 34:
  47. PLS-00103: Encountered the symbol ";" when expecting one of the following:
  48. constant exception <an identifier>
  49. <a double-quoted delimited-identifier> table long double ref
  50. char time timestamp
  51.        
  52. bookIsbn BookTitle.Isbn%type;
  53. bookName BookTitle.btName%type;
  54. numOfCopies number;