Errata for Sams Teach Yourself SQL in 10 Minutes - Second Edition

As much as I’d like to be able to produce completely error free books, the reality of the computer publishing industry is that the pace at which books must be written and released makes this very difficult. And regretfully, my own books do have sporadic mistakes and typos scattered throughout them.

For the benefit of my readers, here is a current errata for Sams Teach Yourself SQL in 10 Minutes - Second Edition. Feel free to print this page for future reference.

And as always, if you come across errors that I do not know about, please let me know. I’ll make sure they are added to this list, and will try to have them corrected in future reprints.


Original printing (260 pages, published May 1, 2001)

PageLocationCorrection
8Last line, word “alphanumeric”.Should be “alphabetical”.
31Second INPUT block, first line.Should read: “SELECT vend_id”.
41The Percent (%) WildcardIf using Microsoft Access, use * instead of %.
43Both INPUT code listings.Some databases (including Microsoft Access) pad fields with spaces, and so these two SELECT statements will not return data as the WHERE clauses will not match. The fix is to add a % at the end of the search pattern (before the second ‘).
48Both OUTPUT blocks (and output on pages 50-52).The downloadable sample Access files have NULL values for two of the rows in the Vendors table. When these values are used in a calculated value, some DBMS’ (including Access) will return a completely NULL value. As such, your OUTPUT may be missing two rows (for the two International addresses). One solution is to save an empty string in that column instead of a NULL value.
59References to UPPER() function.If using Microsoft Access use UCASE() instead.
60Soundex() example.This example may not work if using an Access database. If you receive an “undefined function” error message then you will not be able to use the soundex() function.
61DATEPART() function used in INPUT listing.If using Microsoft Access use ‘yyyy’ instead of yy.
68Last word on page, “criteria”.Should be “criterion”.
72First line of first INPUT, word “items_orders”.Should be “items_ordered”.
81Analysis block, second to last line word, “three”.Should be “four”.
83Second INPUT listing, final line of code.Should read: ORDER BY COUNT(*), order_num;
129Note, last line: laterShould be: latter
138Analysis block, second line, word “preceding”.Should be “following”.
140INPUT block, line beginning “vend_zip”.There is a comma missing at the end of this line.
153First INPUT, line beginning RTRIM.There is a comma missing after the word “cust_address2”.
153Second INPUT, line beginning RTRIM.There is a comma missing after the word “cust_address2”.
154First INPUT, line beginning RTRIM.There is a comma missing after the word “cust_address2”.
164Analysis block, fifth line, word “currenthighest”.Should be “current highest”.
182INPUT block, line beginning “vend_zip”.There is a comma missing at the end of this line.
183Last line of page.Missing word ADD before the word CONSTRAINT.
183Last line of page, word “REFERNCES”.Should be “REFERENCES”.
186Code in INPUT block.Missing word ADD before word CONSTRAINT.
198First bullet, third line.“item_price” should be “prod_price”.