Errata

Oracle PL/SQL Best Practices

Errata for Oracle PL/SQL Best Practices

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page xv
last line on page - web address

The website listed here for getting code examples and downloading the packages
references is WRONG.

Instead of:

http://www.oreilly.com/9780596001216/

It should be:

http://examples.oreilly.com/9780596001216/

Anonymous   
Printed Page 33
Note at bottom of page

The code segment for Oracle 7 or Oracle 8 does not seem to work as shown:

CREATE OR REPLACE PACKAGE book_data
is
total_count INTEGER(10);
SUBTYPE total_count_t IS total_count;

For this to work for me in Oracle 7.3.2.2 I did:

CREATE OR REPLACE PACKAGE book_data
is
total_count INTEGER(10);
SUBTYPE total_count_t IS total_count%TYPE;

Anonymous   
Printed Page 47
2nd line

Should read:
FUNCTION daily_fine RETURN NUMBER;

Anonymous   
Printed Page 56
Example code

The variable l_one_day_fine is not declared or initialized in the code.

Additionally, in the fixed code on page 57, l_overdue_count is not
initialized prior to processing the loop, so the page 57 code is not
equivalent to the page 56 example.

Anonymous   
Printed Page 57
First Loop Exit When statement

The correct syntax of emulating a REPEAT UNTIL Loop specifically
LOOP
EXIT WHEN statement is

LOOP
... body of loop ...

EXIT WHEN boolean_condition;
END LOOP;

However, in this example,
The EXIT WHEN clause is placed right before the body loop. A
know catchable-syntax-error descriptions generated by Oracle could be
something like this:-

ERR *
PLS-00103: Encountered the symbol "INTO" when expecting one
of the following: . ( * @ % & = - + ; < / > in mod not rem
an exponent (**) <> or != or ~= >= <= <> and or like
between is null is not || is dangling

Solution:
After I placed the EXIT WHEN clause right before the END LOOP
statement, it ran without giving me any errors.

Anonymous   
Printed Page 57
First Loop Exit When statement

EXIT WHEN boolean_condition should be terminated by semicolon. It is missing in the example in the book causing the PLS-00103: Encountered the symbol... error

DKryl  Mar 26, 2013 
Printed Page 75
Example function book_title in middle of page

several typos in this function

An extra space is in "l_title"
---------------------------------
IS
l_ title book.title%TYPE;
BEGIN

the above should be

IS
l_title book.title%TYPE;
BEGIN

The RETURN in the BEGIN section is wrong
-----------------------------------------
RETURN l_rec.title

the above should be

RETURN l_title

Anonymous   
Printed Page 77
second bullet in top third of page

you refer to DBMS_UTILITY.FORMAT_CALL STACK

it should have an underscore between CALL and STACK

that is DBMS_UTILITY.FORMAT_CALL_STACK

Anonymous   
Printed Page 97
line 15: SELECT title INTO l_title

The code does not compile as is.
l_title is not delared.
line 15 should read instead:
SELECT title

Anonymous   
Printed Page 101
Top of the page

Sample code on top of page 101 looks flawed as it should relate to the sample
code on the bottom of page 100

Anonymous