Oracle SQL*Plus: The Definitive Guide by Jonathan Gennick Unconfirmed error reports are from readers. They have not yet been approved or disproved by the author or editor and represent solely the opinion of the reader. If you have any error reports or technical questions, you can send them to booktech@oreilly.com. (Please specify the printing date of your copy.) This page was updated August 14, 2002. Here's a key to the markup: [page-number]: serious technical mistake {page-number}: minor technical mistake : important language/formatting problem (page-number): language change or minor formatting problem ?page-number?: reader question or request for clarification UNCONFIRMED errors and comments from readers: [67] Middle of page - GROUP BY expression; In the SQL query, the GROUP BY expression seems to have more variables than nec essary. The only required arguments in the GROUP BY are E.Employee_name and P. Project_name. Therefore, GROUP BY E.EMPLOYEE_ID, E.EMPLOYEE_NAME, P.PROJECT_ID, P.PROJECT_NAME; can become: GROUP BY E.EMPLOYEE_NAME, P.PROJECT_NAME; and still give the same results. {108} In the 4th row of Table 3-2, the string: Mon dd, yyyy hh:mm am should read: Mon dd, yyyy hh:mi am (182) The last sentence of the second text paragraph reads: "Finally, you will see how to write one script that will give you a pretty complete dump of all this information just by issuing one command." I don't believe this is ever shown. The chapter has several scripts, but the sentence in error leads me to believe there will be a final script at the end, probably one that would simply contain START commands for all the others. But I never found anything like that. Maybe you would consider this a small omission, but the chapter contains a lot of scripts, some partial, some complete. I imagine the final script would only list the complete ones. What I am saying is, even though I happen to know how this final script might be done: 1) Other people might not know. 2) I would still find the list handy because I could see a quick list identifying the key scripts from the chapter. That would help me quickly sort out the key scripts from the build-up scripts, partial code examples, etc. {195} LIST_COLUMNS.SQL script; Chapter 4 is devoted to one thing--the proper way to get values from a user that will be plugged into variables in a script. The author is quite clear about why various methods can cause problems, and finally suggests a single method that avoids these problems--the use of ACCEPT. However, in Chapter 6 we are presented with a series of sample scripts that provide information about an Oracle table. In the second script, the author needs to get a value from the user to plug into a variable. Instead of using ACCEPT, the script uses &&1--a method the author has all but damned just a couple of chapters eariler. 1) The ACCEPT command is not used. 2) There is no PROMPT, so a user has to just "know" what argument to enter-- another violation of the author's guidelines. 3) The value goes into &&1 and this user variable is not undefined at the end of the script -- another violation of the author's own guidelines. This means the user variable "sticks around" and to quote the author, this "results in your not being prompted for a value the second time you run the script." 4) Another problem pointed out by the author--failure to undefine a user variable such as &&1 is that it might interfere with other scripts that also use that variable. I really like this book, and agree with the author's points in Chapter 4, so I was very surprised that a script appearing just two chapters later violated these great methods for coding great SQL*PLUS scripts. [205-206] LIST_CONSTRAINTS.SQL script, foreign key and check constraints sections; I have an edition published in March 1999. LIST_CONSTRAINTS.SQL (Chapter 6) The foreign key and check constraint queries both include the status of the constraint in status_var in the TTITLE - but neither select status from the all_constraints table. So the last value selected (from the first query, for primary key and unique constraints) will be carried forward to all foreign key and check constraints. The above also applies to the file I downloaded from the website. [245] The beginng of the script "user_security" ; The command SET VERIFY OFF has not been included in the script which results in the display of the verification of substitution variables (&variables) [247 and downloadable script] Near the end of the script at the top of the page, these two lines appear: COLUMN b_report_type FORMAT A30 NOPRINT NEW_VALUE s_report_type SELECT b_report_type FROM dual; They should be changed to read: COLUMN my_alias FORMAT A30 NOPRINT NEW_VALUE s_report_type SELECT :b_report_type my_alias FROM dual; This bug appears in the script in book, and the same script download from your site (user_security_plsql_example.sql). {256} The second paragraph begins: "The only thing missing is the ampersand sign...." Should read: "The only thing missing is the at sign...." [392] last paragraph (going over to page 393); The command below does set the command prompt to "> " and but does not have the host name. I am using Oracle 8.1.7, SQL*Plus: Release 9.2.0.1.0 and Microsoft Windows XP. Printing history: March 1999: First edition [9/99]. set termout off column dbname new_value prompt_dbname select substr(global_name, 1, instr(global_name,'.')-1) dbname from global_name; set sqlprompt "&&prompt_dbname> " set termout on