Oracle SQL*Plus, The Definitive Guide
Corrections
What follows is a compendium of all errors that I'm aware of in my book. All these errors may not be present in your copy. O'Reilly corrects known errors with each printing, so the more recently your book was printed, the fewer of these errors will apply.
Sample Data Scripts
German readers need to adjust the dates used in the bld_ins.sql script.
Thanks to Richard Lippmann of Bavaria, Germany for pointing out that the
TO_DATE calls in the bld_ins.sql script will fail if the language setting
for your database is German. Richard recommends the following changes:
Change this to that: - -May -Mai - -Dec -Dez - -Mar -Mär (german Umlaut in Windows, not the DOS-Umlaut) - -Oct -Okt
I would imagine that similar changes need to be made if you are running the scripts on a French system, a Spanish system, or one using any other non-English language.
Chapter 2
Page 25, the description for scriptfile
When you invoke SQL*Plus to execute a script file from the command line,
SQL*Plus will execute the commands in that script and then wait for more
input. Of course, if you're in a batch mode, you wont be able to supply
that input. If you want SQL*Plus to exit after running a script, then
you must include an EXIT command in your script.
Page 25, the list item arg1 agr2 arg3
If you look closely, you'll see that the second element in the heading
is misspelled agr2. It should be arg2. The g and r characters
were mistakenly transposed.
Chapter 2 refers you to chapter 11 for help on customizing
your editor setting.
In chapter 2 (page 57), I told you that you could customize the SQL*Plus
editor, and referred you to chapter 11 for more information. Unfortunately,
I didn't put that information in chapter 11. I apologize for that oversite.
The FAQ for the book contains the information
you need in order to do this.
Page 51, first text paragraph on the page
This paragraph says that leading spaces are lost when you retype a line
in the buffer using the method shown in the example. That isn't correct.
Leading spaces are preserved, at least in every version of SQL*Plus
that I can get my hands on now.
Chapter 3
Page 108, Table 3-2, fourth entry
The fourth entry in Table 3-2 is incorrect; it mistakenly uses "mm"
instead of "mi" to represent the minutes. The correct format
is: Mon dd, yyyy hh:mi am.
Chapter 4
Page 150, solutions to using concatenation character at end of sentence
I give two solutions to prevent the period at the end of a sentence from
going away when a user variable reference immediately preceding the period.
A thinking reader pointed out a third solution, which is the simplest
of them all. Simply double-up on the period. For example:
SQL> DEFINE last_word = 'period'
SQL> PROMPT This sentence has no &last_word..
This sentence has no period.
The first period will be treated as the concatenation character, and will be absorbed. The second period will mark the end of the sentence. Of course, this solution assumes the default setting of SET CONCAT ON.
Chapter 6
Page 183, Table 6-2.
At the bottom of the page, the column named NUM_ROW should really be NUM_ROWS.
Page 186, the ALL_CONSTRAINTS view
The description for the CONSTRAINT_TYPE column of the ALL_CONSTRAINTS
view should include the following:
U = Unique Key
Unique key constraints are similar to primary key constraints in that they require each row in the table to have a unique set of values for the key columns. However, unique key columns can be null. Primary key columns may not be null.
Page 200, under the Table Constraints heading
In the book, I state that you can get the definition of a check constraint
just by looking at the ALL_CONSTRAINTS table. Indeed you can. The definition
is in the SEARCH_CONDITION column. However, what I said in the book may
leave the impression that the ALL_CONS_COLUMNS view is irrelevant for
check constraints. That's not true. The ALL_CONS_COLUMNS view is still
relevant. With a check constraint, ALL_CONS_COLUMNS can be used to identify
the columns involved. It won't get you to the exact formula used for the
check condition, but it will tell you which columns are used in that formula.
Thanks to Ron Joffe for bringing this very subtle issue to light.
Page 216, Running the SHOW_TRIGGER.SQL script
The text incorrectly refers to a trigger named TEST_1. The example is
showing a trigger named EMP_HIRE_DATE_CHECK. That same name should have
been used in the text immediately preceding the example.
Chapter 11
Page 382, The SET TRIMSPOOL command
In the last paragraph describing this command, I suggest leaving TRIMSPOOL
ON to prevent "short" records from being generated. In fact,
you should leave TRIMSPOOL OFF to prevent "short" records. That
way, trailing spaces won't be trimmed, and all records written to the
spool file will be the same size.
Appendix A
Page 424, the list item arg1 agr2 arg3
If you look closely, you'll see that the second element in the heading
is misspelled agr2. It should be arg2. The g and r characters
were mistakenly transposed.
Page 448, The LIST command does not delete.
The first sentence under the heading for the LIST command reads as follows:
The LIST command is an editing command used to delete the current line from the buffer.That is a cut & paste error. The LIST command does not delete. It does just what it says, it displays the current line.
Index
Page 428, the entry for: COMMIT statement, disabling feedback from
This entry points you to page 138. It should also point you to page 84.