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
Printed Page Chapter12
"Trunc to the first of the Month Example

Error in 12. Date Functions of Oracle PL/SQL Programming Second Edition

Just thought maybe no one else reported this

In chapter 12. Date Functions there is an example, "Trunc to the first
of the month:
TRUNC (TO_DATE ('12-MAR-1994'), 'MONTH') ==> 01-MAR-1994
TRUNC (TO_DATE ('17-MAR-1994'), 'MM') ==> 01-APR-1994 "

I believe it should say TRUNC (TO_DATE ('17-MAR-1994'), 'MM') ==>
01-MAR-1994

Anonymous  Aug 13, 2008 
Printed Page 70
At the bottom 1/4

The example on page 70 has the following statement in it:

l_errmsg PLS_INTEGER := NVL (errmsg, SQLERRM);

The statement should be (as is shown in your err.pkg):

l_errmsg VARCHAR2(1000) := NVL (errmsg, SQLERRM);

Anonymous   
Printed Page 89
Definition of NATURAL subtype

The definitions for NATURAL and POSITIVE subtypes, seems to have no differences, but
I think NATURAL should be NON-NEGATIVE (including the number "0"):

when you read:

NATURAL
1 through 2e31

In my opinion, should be:

NATURAL
0 through 2e31

Anonymous   
Printed Page 126
Last Line

Under the heading "Named Constant", the last line reads:
c_last_date CONSTANT DATE := SYSDATE :

It should read:
c_last_date CONSTANT DATE := SYSDATE;

Anonymous   
Printed Page 345
3rd snippet of code after 3rd paragraph

In the snippets of code below:

------------
IF UPPER (access_type_in) = 'REUSE'
THEN
RETURN company_table (id_in);
ELSE
RETURN name_from_database;
END IF;

and further:

EXCEPTION
WHEN NO_DATA_FOUND
THEN
return_value := name_from_database;
IF return_value IS NOT NULL
THEN
company_table (id_in) := return_value;
END IF;

RETURN return_value;
END;

and further in code of fuction company.name
-------------

the function name_from_database is used without parameter.
But declaration of this function is :

FUNCTION name_from_database (id_in IN company.company%TYPE)
RETURN company.name%TYPE
IS
CURSOR comp_cur IS
SELECT name FROM company
WHERE company_id = id_in;
return_value company.name%TYPE := NULL;
BEGIN
OPEN comp_cur;
FETCH comp_cur INTO return_value;
CLOSE comp_cur;
RETURN return_value;
END;

It is a mistake I think. Function name_from_database must be used with parameter id_in.

Anonymous   
Printed Page 498
9th line from bottom

line now reads:

"There are several consquences ..."

should read:

"There are several consequences ..."

Anonymous   
Printed Page 504
First paragraph of Default Values, third sentence

Sentence now reads:
"You must, of course, include an actual parameter for any IN OUT
parameters, even if they have default values."

This line gives the impression that it is o.k. to assign default values to
IN OUT parameters, thus contradicting page 499, The IN OUT mode, numeral 1.:

1. An IN OUT parameter cannot have a default value.

Anonymous   
Printed Page 775
The first code fragment uses a procedure called MESSAGE

MESSAGE ('Invalid status code: ' || status_cd_in);

But when I try to use this Oracle complains "identifier 'MESSAGE' must be
declared". MESSAGE is not in this book's index or in the index of "Oracle 8:
The Complete Reference."

So there is definitely a missing index entry, and there may or may not be a
missing explanation of where the MESSAGE procedure comes from.

Anonymous