Errata

Oracle PL/SQL Programming

Errata for Oracle PL/SQL Programming

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
Other Digital Version Line 105
central_error_log.sql on Website

Line 105 should read:
p_find_table.max_timestamp := GREATEST(NVL(p_find_table.max_timestamp,v_error_table(counter).timestamp),

The error is min_timestamp should be max_timestamp on the righthand side of the equation.

Brian Kretch  Dec 20, 2018 
Printed Page 7
Code example

The update statement replaces any occurrence of "STEVEN" in the column 'author' for the selected rows. With this, the names of any of your co-authors that contain "STEVEN", will also be changed.

You may know that you have never co-written a book with someone who's name contains "STEVEN". But there may be readers that do not know this.

I would expect this to be explained in the comment, or else the update statement should replace occurences of "FEUERSTEIN, STEVEN" rather than just "STEVEN".

Mai Ho  Apr 20, 2017 
Printed Page 63
3rd paragraph

The example procedure header is calc_totals.
However, when referenced in text the qualified identifier name is cal_totals.salary

Roberto Hernandez  Apr 12, 2015 
PDF Page 293
last rows

"Any fractional number of years (in this case 0.5) will be converted to an equivalent number of months, with the result being rounded to an integer. Thus, 10.9 years will convert to an interval of 10 years, 10 months".

It is not true that the result is *rounded* to an integer; instead, it is truncated. The proof is that, as you said, 0.9 years (10.95 months) will convert to 10 months and not 11 months.

See also pag.119 of "Mastering Oracle SQL" by Sanjay Mishra, O'Reilly:
"Any fractional part of a month is ignored".

Filippo  Feb 17, 2014 
PDF Page 299
3rd row under "The EXTRACT Function" Title

EXTRACT (component_name, FROM {datetime | interval})

the comma after "component_name" is not required.

Filippo  Feb 17, 2014 
PDF Page 311
1st word of 7th row

fmanage

instead of

manage

Filippo  Feb 17, 2014 
PDF Page 319
2nd block of code

TYPE customer_sales_rectype IS RECORD
(customer_id NUMBER(5),
customer_name customer.name%TYPE,
total_sales NUMBER(15,2)
);

The 2nd field's datatype reference and unknown table/column. It could be corrected with:

TYPE customer_sales_rectype IS RECORD
(customer_id NUMBER(5),
customer_name cust_sales_roundup.customer_name%TYPE,
total_sales NUMBER(15,2)
);

Filippo  Feb 17, 2014 
PDF Page 428
SQL output

Both the query using

f.fall.existsNode

and the other one using

EXISTSNODE(

return

FALL_ID
----------
1
2

while they return also "3" as the URL node is present also in the record with FALL_ID=3.

Filippo  Apr 17, 2014 
Printed Page 690
First paragraph

The text should read: "You can find the implementation of one such centralized error-handling package in the central_error_log.sql file..." instead of "...in the error_log.sql file....".

Brian KRetch  Dec 20, 2018 
Printed Page 700
There are 2 spots in the code

The code has:

OPEN curs_get_ts_quota(v_object_name, v_username)....

SImilarly, when altering the quota in the v_sql statement....
'ON ' || v_object_name

The above v_object_name references should be v_tbspc_name. The text indicates that the quota is checked on the object which is exhausting the tablespace quota (a TABLE or INDEX) when it should be checking the tablespace. Obviously, when resetting the quota, it has to be set against the tablespace, not an object (TABLE, INDEX, etc.).

Brian Kretch  Dec 21, 2018 
Printed Page 834
Line 33 in script

Line 33 is missing a right parenthesis at the end of the line. It should read:
...(indx).ERROR_INDEX));

It currently reads:
...(indx).ERROR_INDEX);

Brian Kretch  Jan 02, 2019 
Printed Page 876
PROCEDURE move_buffer_to_log.sp

I am running the procedure on Oracle 12.2.0.1. I have found that the procedure move_buffer_to_log gets in an infinite loop because the dbms_output.get_lines function call always returns (in addition to the text in the dbms_output buffer) a single NULL line at the end. Hence, when the buffer gets called to return the last 100 lines of text, even if it is empty, it returns a single NULL line. In turn, the EXIT WHEN l_buffer.COUNT condition is never = 0, and the loop never terminates. I put a loop to remove all lines from the buffer where the line was NULL (no characters) before checking the l_buffer.COUNT=0 condition, and it worked fine.

Brian Kretch  Jan 14, 2019 
Printed Page 1004
The $IF Directive

$ELSEIF should be $ELSIF

The example code on page 1002 should be changed too.

Frodo Looijaard  Nov 20, 2014