Errata

Oracle PL/SQL Programming

Errata for Oracle PL/SQL Programming, Fourth Edition

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. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

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

Version Location Description Submitted By Date submitted Date corrected
Printed
Page 8
Line 9 of code

"9" deleted

########################################

Anonymous    Feb 01, 2007
Printed
Page 31
2nd paragraph, 3rd bullet

'(see "Healing Invalids" in Chapter 20)'
should be:
'(see "Recompiling Invalid Code" in Chapter 20)'

Anonymous    Aug 01, 2007
Printed
Page 38
2nd paragraph, point 1.

The path to glogin.sql references a folder named "qlplus" which should, of course, be
"sqlplus".

Anonymous    Aug 01, 2007
Printed
Page 105
second-to-last line

Missing a period after the word "code." Reads:

... "many additional lines of code The result-" ...

Should read:

... "many additional line of code. The result-" ...

Anonymous    Jul 01, 2008
Other Digital Version
105
second-to-last line

Missing a period after the word "code." Reads:

... "many additional lines of code The result-" ...

Should read:

... "many additional line of code. The result-" ...

Anonymous    Jul 01, 2008
Printed
Page 150
Code example

CREATE OR PROCEDURE ...
->
CREATE OR REPLACE PROCEDURE ...

########################################

Anonymous    Feb 01, 2007
Printed
Page 176
4th paragraph

As printed:
DECLARE
my_ msg_id aq.msgid_type
BEGIN

Suggested correction:
DECLARE
my_msg_id aq.msgid_type%TYPE
BEGIN

Note from the Author or Editor:
The reader is correct that there is a mistake, but the actual code should be:

DECLARE
my_msg_id aq.msgid_type%TYPE;
BEGIN

That is, I have added a semi-colon to the end of the statement.

Anonymous  Sep 09, 2008 
Printed
Page 196
Sentence following heading "Concatenating Strings"

You missed the "t" in "two".

Anonymous    Aug 01, 2007
Printed
Page 224
Last paragraph

UNISTR(string1)
...This is the opposite of ASCISTR. ...

ASCISTR ==> ASCIISTR

Anonymous    Aug 01, 2007
Printed
Page 268
-1, 6th sentence

INTERVAL DAY TO MONTH
->
INTERVAL YEAR TO MONTH

########################################

Anonymous    Feb 01, 2007
Printed
Page 362
code block

It says:

DECLARE
SUBTYPE temperature IS NUMBER;
SUBTYPE coordinate_axis IS PLS_INTEGER;

TYPE temperature_x IS TABLE OF temp INDEX BY coordinate_axis;
TYPE temperature_xy IS TABLE OF tempx INDEX BY coordinate_axis;
TYPE temperature_xyz IS TABLE OF tempxy INDEX BY coordinate_axis;

temperature_3d temperature_xyz;
BEGIN
temperature_3d (1) (2) (3) := 45;
END;
/

It should be:

DECLARE
SUBTYPE temperature IS NUMBER;
SUBTYPE coordinate_axis IS PLS_INTEGER;

TYPE temperature_x IS TABLE OF temperature INDEX BY coordinate_axis;
TYPE temperature_xy IS TABLE OF temperature_x INDEX BY coordinate_axis;
TYPE temperature_xyz IS TABLE OF temperature_xy INDEX BY coordinate_axis;

temperature_3d temperature_xyz;
BEGIN
temperature_3d (1) (2) (3) := 45;
END;
/

Anonymous    Aug 01, 2007
Printed
Page 373
Summary table, row 2 (<> or !=), Description column

Compares two nested tables, and returns FALSE if they differ...
->
Compares two nested tables, and returns TRUE if they differ...

########################################

Anonymous    Feb 01, 2007
Printed
Page 399
4th paragraph

DBMS_LOB.GET_LENGTH instead of DBMS_LOB.GETLENGTH

Luis Viloria  Aug 05, 2009 
Printed
Page 427
subsection "The INSERT statement", 2nd bullet point.

INSERT INTO table [(col1, col2, ..., coln)]
AS
SELECT ...;

The correct synthax should be (according to Oracle 10.2 documentation) without AS like that:

INSERT INTO table [(col1, col2, ..., coln)]
SELECT ...;

Anonymous    Aug 01, 2007
Printed
Page 434
last code example

my_book.isbn
my_book.title
my_book.summary
my_book.author
my_book.page_count

->

my_book_new_info.isbn
my_book_new_info.title
my_book_new_info.summary
my_book_new_info.author
my_book_new_info.page_count

########################################

Anonymous    Feb 01, 2007
Printed
Page 436
Figure 14-2

The code now reads:

CREATE OR REPLACE PROCEDURE order_books (
isbn_in IN name_varray
new_count_in IN number_varray)
IS
BEGIN
FORALL indx IN isbn_in.FIRST ..
isbn_in.LAST
UPDATE books
SET page_count =
new_count_in (indx)
WHERE isbn = isbn_in (index);
END;

it should be:

CREATE OR REPLACE PROCEDURE order_books (
isbn_in IN name_varray
, new_count_in IN number_varray)
IS
BEGIN
FORALL indx IN isbn_in.FIRST ..
isbn_in.LAST
UPDATE books
SET page_count =
new_count_in (indx)
WHERE isbn = isbn_in (indx);
END;

Anonymous   
Printed
Page 437
first code example

[ lower_bound ... upper_bound |
->
[ lower_bound .. upper_bound |

########################################

Anonymous    Feb 01, 2007
Printed
Page 439
Figure 14-3

"FOR ALL indx IN isbn_in.FIRST"
should be replaced by
"FOR indx IN isbn_in.FIRST"

Anonymous   
Printed
Page 441
last bullet of example

'INSERT INTO ' || l_table || ' VALUES (:emp_pky, :new_salary)
->
'INSERT INTO ' || l_table || ' VALUES (:emp_pky, :new_salary)'

########################################

Anonymous    Feb 01, 2007
Printed
Page 441
Table 14-2, Description column, second row

Returns TRUE if the last execution of the SQL statement modified one or more rows.
->
Returns FALSE if the last execution of the SQL statement modified one or more
rows.

########################################

Anonymous    Feb 01, 2007
Printed
Page 442
Middle of code listing, UPDATE statement

In the statement:

UPDATE books
SET page_count
WHERE isbn = my_books (book_index);

change:
SET page_count
to
SET page_count = page_count / 2

Anonymous    Aug 01, 2007
Printed
Page 443
third bullet point about %BULK_ROWCOUNT

The third bullet point (just before section "ROLLBACK behavior with FORALL") talks
about "deletes and inserts". It should be "deletes and updates", as inserts are
covered by bullet point #2.

Anonymous    Aug 01, 2007
Printed
Page 448
2nd paragraph, below description table

the Boolean indices collection had no element defined at position 13067.

should be:

the "values of" collection had no element whose value equaled 13067.

Anonymous    Aug 01, 2007
Printed
Page 473-474
Example at the bottom, and top of next page (occurs twice)

l_isbn
->
isbn_in

########################################

Anonymous    Feb 01, 2007
Printed
Page 476
example at top of page

The example that starts on page 475 has an error on page 476: the DBMS_OUTPUT
statement at the end refers to an undeclared variable. "DBMS_OUTPUT.put_line
(l_foundsome);" should be "DBMS_OUTPUT.put_line (l_numfound);".

Anonymous    Aug 01, 2007
Printed
Page 485
2nd bullet item ("If you have opened a SELECT FOR UPDATE query,...")

Remove entire bullet item.

Anonymous    Aug 01, 2007
Printed
Page 487
2nd line after Explicit Cursor Attributes

5th edition reads %ROWCOUNTM with an extra M

Note from the Author or Editor:
replace ROWCOUNTM with ROWCOUNT

Chris Hanes  Aug 05, 2010 
Printed
Page 488
last line

joke_category%TYPE
->
joke.category%TYPE

########################################

Anonymous    Feb 01, 2007
Printed
Page 492
first code example

FROM transportation
BULK COLLECT INTO names, mileages
->
BULK COLLECT INTO names, mileages
FROM transportation

########################################

Anonymous    Feb 01, 2007
Printed
Page 493
code example

FROM transportation
BULK COLLECT INTO l_transportation
->
BULK COLLECT INTO l_transportation
FROM transportation

########################################

Anonymous    Feb 01, 2007
Printed
Page 498
Last 2 sentences on page

"Without the NOWAIT clause, your process will block until the table is
available. There is no limit to the wait time unless the table is remote."

should be:

"Use the WAIT clause to specify the maximum number of seconds Oracle
should wait to obtain the lock. If no wait behavior is specified, then
your process will be blocked until the table is available."

Anonymous    Aug 01, 2007
Printed
Page 499
1st complete sentence on page

"For remote objects, the Oracle initialization parameter,
DISTRIBUTED_LOCK_TIMEOUT, is used to set the limit."

should be:

"For remote objects, the Oracle "hidden" initialization parameter,
_DISTRIBUTED_LOCK_TIMEOUT, is used to set the limit."

Anonymous    Aug 01, 2007
Printed
Page 511
1st paragraph under "Scope of cursor object" heading

Remove this text from the 1st sentence:

"(unless declared in a package, which makes the variable
globally accessible)"

Anonymous    Aug 01, 2007
Printed
Page 517
4th bullet item under "Restrictions on Cursor Expressions" heading

Remove the entire bullet item ("A cursor expression can be used as an
argument to table functions,...")

Anonymous    Aug 01, 2007
Printed
Page 520
4th paragraph (the one before the tip section)

The closing parentheses are missing after "(Data Manipulation Language" and "(Data
Definition Language".

Anonymous    Aug 01, 2007
Printed
Page 521
Second code sample

The function tabcount needs a

RETURN retval;

after the EXECUTE IMMEDIATE statement, otherwise the function would not compile.

Anonymous  May 21, 2008 
Printed
Page 521
Second code sample

The function tabcount needs a

RETURN retval;

after the EXECUTE IMMEDIATE statement, otherwise the function would not compile.

Anonymous   
Printed
Page 550
middle of page

Please change

cols.col_name

to

cols (colind).col_name

Anonymous    Aug 01, 2007
Printed
Page 559
first example

Line #13 (the last one) should look like "END;" instead of "* END;;".

Anonymous    Aug 01, 2007
Printed
Page 560
second line on page

Line #16 (the last one) of the example that spans from the previous page should look
like "END;" instead of "* END;".

Anonymous    Aug 01, 2007
Printed
Page 610
First sentence of first paragraph under "Table Functions" near middle of

page.;
The first sentence is missing the word, "it" -- i.e., "as if it were a relational table."

Anonymous    Aug 01, 2007
Printed
Page 653
-1

2 MB
->
20 MB

########################################

Anonymous    Feb 01, 2007
Printed
Page 711
2nd paragraph

USER_TRIGGERS and USER_TRIG_COLUMNS

should read:

USER_TRIGGERS and USER_TRIGGER_COLS

Note from the Author or Editor:
I have frixed this in OPP6

Dan Day  Jun 08, 2012 
Printed
Page 806
line 48

|| 'Content-Type: multipart/mixed; boundary="' || boundary || '"', 2
->
|| 'Content-Type: multipart/mixed; boundary="' || boundary || '"', 2);

########################################

Anonymous    Feb 01, 2007
Printed
Page 806
line 51

writedata('Content-Type: text/plain; charset=ISO-8859-1; format=flowed')
->
writedata('Content-Type: text/plain; charset=ISO-8859-1; format=flowed');

########################################

Anonymous    Feb 01, 2007
Printed
Page 876
The line numbered listing under the 1st paragraph

Line 6 of the code listing is missing information:

6 audit_condition => 'SALARY >= 150000,

should be, according to the subsequent description:

6 audit_condition => 'SALARY >= 150000 OR EMPID = 100',

Anonymous    Aug 01, 2007
Printed
Page 887
Figure 23-2

"PL/SQL execution engine" should be "SQL execution engine"
(In 3rd Edition this is on page 759.)

Anonymous   
Printed
Page 1012
Middle of page

Please change:

Lines 10, 12, 14, 16
These statements use the ANYDATA.ConvertNNN member functions introduced in the Oracle
9i Database Release 2...

to:

Lines 10, 12, 14, 16
These statements use the ANYDATA.AccessNNN member functions introduced in the Oracle
9i Database Release 2...

Anonymous    Aug 01, 2007
Printed
Page 1021
First sentence

"The alternative to MAP is an ORDER member function, which compares two METHODS: SELF, and another object..."
should be
"The alternative to MAP is an ORDER member function, which compares two objects: SELF, and another object..."

Anonymous  May 22, 2008