Inside Microsoft® SQL Server® 2008: T-SQL Querying

Errata for Inside Microsoft® SQL Server® 2008: T-SQL Querying




The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
Printed
Page xxiii

"TSQLFundamentals2008 database" should be "InsideTSQL2008 database.sql" On page xxiii, the caption for Figure I-1 contains an incorrect database reference. Change: "FIGURE I-1 Data model of the TSQLFundamentals2008 database" To: "FIGURE I-1 Data model of the InsideTSQL2008 database.sql"

Microsoft Press  Jul 13, 2010 
Printed, PDF
Page 18
Bottom of the page

Incorrect sample output At the bottom of p. 18, the query output is incorrect. Change: orderid customerid --------------- --------------- 11077 RATTC 11076 BONAP 11075 RICSU to: orderid customerid --------------- --------------- 7 NULL 6 MRPHS 5 KRLOS (This comports with the data that we INSERT-ed back on p. 6.)

Note from the Author or Editor:
Line breaks in the reader's description did not survive the erratum submission process. There should be line breaks in the correction just as there are in the published query output. Erratum reclassified from serious to minor: The error is clearly a mistake and will not misinform readers.

Art Bergquist  Aug 27, 2012 
Printed, PDF
Page 26
2nd bullet point

The correct edit for the previous errata I just submitted may actually be to replace: "2. U2: Extracting Elements" with: "2. U2: Extracting Element" to match the text in the 1-U2 box in the upper gray section of Figure 1-1 on p. 4.

Note from the Author or Editor:
Confirmed.

Art Bergquist  Aug 29, 2012 
Printed
Page 32

Incorrect sample output On page 32, the query output is incorrect. Change: country region city --------------- --------------- --------------- USA WA Kirkland USA WA SeattleTo: region city --------------- --------------- WA Kirkland WA Seattle

Microsoft Press  Jul 13, 2010 
Printed, PDF
Page 47
4th-to-last row from the bottom of Table 2-4

In the 4th-to-last row of Table 2-4, the character before the first "3" needs to be changed to "1" (the character before the first "3" is either an upper-case "I" [pronounced "eye"] or a lower-case "l" [pronounced "ell"]).

Note from the Author or Editor:
Confirmed.

Art Bergquist  Sep 01, 2012 
Printed, PDF
Page 52
Last sentence of the 2nd-to-last paragraph

In the last sentence of the 2nd-to-last paragraph, I believe that "remains" needs to be replaced with "remain" in the following sentence: "What does remains something of a paradox is whether a correct theoretical foundation for mathematics exists." The corrected sentence reads as follows: "What does remain something of a paradox is whether a correct theoretical foundation for mathematics exists." Alternatively, remove the word "does" from the original sentence: "What remains something of a paradox is whether a correct theoretical foundation for mathematics exists."

Note from the Author or Editor:
Confirmed.

Art Bergquist  Sep 03, 2012 
Printed, PDF
Page 57
1st sentence of the paragraph under "Alphabetical Order"

In 1st sentence of the paragraph under "Alphabetical Order": "When we talk about alphabetical order, the meaning of precedes is culture dependent." I believe that "precedes" needs to be italicized to match the italicization of "precedes" in the 1st sentence of the paragraph under "Numerical Order". I also believe that "culture dependendent" needs to be hyphenated.

Note from the Author or Editor:
Confirmed.

Art Bergquist  Sep 03, 2012 
Printed, PDF
Page 65
1st sentence in 1st paragraph under "The Keyword IF in Control-of-Flow Statements"

In the 1st sentence in 1st paragraph under "The Keyword IF in Control-of-Flow Statements", I believe "set based" should be replaced with "set-based" in the following: "Although the focus of this book is T-SQL's query language, and SQL's central (or at least most interesting) paradigm is set based, "regular" programming based on decision and repetition is also implemented."

Note from the Author or Editor:
Confirmed..

Art Bergquist  Sep 04, 2012 
Printed, PDF
Page 73
3rd-to-last line on the page

In the 3rd-to-last line on the page, the word "are" needs to be inserted in between "There" and "are" in the following sentence: "There a number of alternatives and generalizations to predicate logic." The corrected sentence reads as follows: "There are a number of alternatives and generalizations to predicate logic."

Note from the Author or Editor:
Confirmed.

Art Bergquist  Sep 04, 2012 
Printed, PDF
Page 86
6th sentence in the 2nd paragraph under the heading "Naming Conventions"

The 6th sentence in the 2nd paragraph under the heading "Naming Conventions": "However, if the table and the columns would be named Table1(column1, column2, column3, column4)." does not appear to be a complete sentence. Replacing "However" with "Not so" would "make it work" (i.e., flow) with the previous sentence. I also recommend inserting a blank space after "Table1". The resultant sentence reads as follows: "Not so, if the table and the columns would be named Table1 (column1, column2, column3, column4)."

Note from the Author or Editor:
Confirmed. Only the page number where this sentence appears is 89, not 86.

Art Bergquist  Sep 05, 2012 
Printed, PDF
Page 91
2nd-to-last sentence in the 2nd paragraph under the “Relational Algebra” heading

In the 2nd-to-last sentence in the 2nd paragraph under the “Relational Algebra” heading: "Of course, because the collection of relational operators is open ended, my list is not complete." “open ended” should be replaced with “open-ended”

Note from the Author or Editor:
Confirmed.

Art Bergquist  Sep 06, 2012 
Printed, PDF
Page 93
3rd full sentence on the page

In the 3rd full sentence on the page: "Such an operator is not a part of Codd's original algebra, so I will introduce after this section that deals with the original eight operators." I believe the word “it” should be inserted in between “introduce” and “after” The corrected sentence reads as follows: “Such an operator is not a part of Codd’s original algebra, so I will introduce it after this section that deals with the original eight operators.”

Note from the Author or Editor:
Confirmed.

Art Bergquist  Sep 06, 2012 
PDF
Page 94
Figure 3-3

The Minus operator diagram has an error. The shaded part should be the entire inverse 'L' shape of the upper box instead of the just the section shaded.

Arkajeet Dasgupta  Feb 02, 2013 
Printed, PDF
Page 101
Last sentence of the first paragraph under Figure 3-9

In the last sentence of the first paragraph under Figure 3-9: "Although this book does not deal with temporal problems, many books do, such as Inside Microsoft SQL Server 2008: T-SQL Programming by Itzik Ben-gan et al. (Microsoft Press, 2009)." "Ben-gan" should be replaced with "Ben-gan," (insert a comma [","] immediately after "Ben-gan").

Note from the Author or Editor:
Also, last name should be spelled as Ben-Gan

Art Bergquist  Sep 07, 2012 
Printed, PDF
Page 110
3rd sentence in the 1st full paragraph

In the 3rd sentence in the 1st full paragraph: "The details of constraints are quite system specific, and it seems more appropriate to switch to the system that this book is about - namely, Microsoft SQL Server 2008." please replace "system specific" with "system-specific". The corrected sentence reads as follows: "The details of constraints are quite system-specific, and it seems more appropriate to switch to the system that this book is about - namely, Microsoft SQL Server 2008."

Note from the Author or Editor:
Confirmed.

Art Bergqquist  Sep 10, 2012 
Printed, PDF
Page 123
Last sentence in the 1st paragraph

In the last sentence in the 1st paragraph: "Figure 3-14 shows a denormalized version of the invoices database." please capitalize the "i" at the beginning of "invoices". Here is the corrected sentence: "Figure 3-14 shows a denormalized version of the Invoices database."

Note from the Author or Editor:
Confirmed.

Art Bergquist  Sep 10, 2012 
Printed
Page 249
Fourth sentence from bottom of page

Currently: "Don't forget that page reads are the only factor that you should take into consideration." Should be: "Don't forget that page reads are not the only factor that you should take into consideration."

Note from the Author or Editor:
Confirmed.

Anonymous  Jul 14, 2010 
Printed
Page 318

Page 318, syntax for derived tables above Note Currently: FROM (derived_table_query) AS derived_table_alias Should be: FROM (<derived_table_query>) AS <derived_table_alias>

Microsoft Press  Jul 13, 2010 
Printed
Page 331

Middle of page Currently: ranking_function OVER([PARTITION BY col_list] ORDER BY col_list) Should be: <ranking_function> OVER([PARTITION BY <col_list>] ORDER BY <col_list>)

Microsoft Press  Jul 13, 2010 
Printed
Page 339
Second column heading in output of query at bottom of page

Page 339, Second column heading in output of query at bottom of page Currently: dups Should be: cnt

Note from the Author or Editor:
Confirmed.

Anonymous  Oct 07, 2010 
Printed
Page 438
Query in body of page

Currently: WITH EXCEPT_ALL AS ( SELECT ROW_NUMBER() OVER(PARTITION BY country, region, city ORDER BY (SELECT 0) AS rn, country, region, city FROM HR.Employees EXCEPT SELECT ROW_NUMBER() OVER(PARTITION BY country, region, city ORDER BY (SELECT 0) AS rn, country, region, city FROM Sales.Customers ) SELECT country, region, city FROM EXCEPT_ALL; Error: missing closing parenthesis after (SELECT 0) in both ROW_NUMBER expressions. Should be: WITH EXCEPT_ALL AS ( SELECT ROW_NUMBER() OVER(PARTITION BY country, region, city ORDER BY (SELECT 0)) AS rn, country, region, city FROM HR.Employees EXCEPT SELECT ROW_NUMBER() OVER(PARTITION BY country, region, city ORDER BY (SELECT 0)) AS rn, country, region, city FROM Sales.Customers ) SELECT country, region, city FROM EXCEPT_ALL;

Note from the Author or Editor:
Confirmed.

Anonymous  Jul 16, 2010 
Printed
Page 472
Output of first query in page

Chapter 8, Page 472, Output of first query in page Correction: Output of query should not include the last two rows with the zero quantities.

Anonymous  Oct 18, 2010 
Printed
Page 490

Query incorrect On page 490, the query near the top of the page is incorrect. Change: SELECT groupid, CAST(ROUND(EXP(SUM(LOG(ABS(NULLIF(val,0)))))* (1-SUM(1-SIGN(val))%4)*(1-SUM(1-SQUARE(SIGN(val)))),0) AS INT) AS product FROM dbo.Groups GROUP BY groupid;To: SELECT groupid, CAST(ROUND(EXP(SUM(LOG(ABS(NULLIF(val,0)))))* (1-SUM(1-SIGN(val))%4)*(1-MAX(1-SQUARE(SIGN(val)))),0) AS INT) AS product FROM dbo.Groups GROUP BY groupid; Microsoft Press is committed to providing informative and accurate books. All comments and corrections listed above are ready for inclusion in future printings of this book. If you have a later printing of this book, it may already contain most or all of the above corrections.

Microsoft Press  Jul 13, 2010 
Printed
Page 791
Under plan guides and also under queries | plan guides

Currently: Index says plan guides are mentioned in page 124. Correction: Plan guides are mentioned in page 186. Note: Plan guides are just mentioned in the T-SQL Querying book. They are covered in detail in the T-SQL Programming book in Chapter 03 - Stored Procedures.

Anonymous  May 09, 2012 
Printed
Page 794
Under sp_create_plan_guide

Currently: Index says sp_create_plan_guide is mentioned in page 124. Correction: sp_create_plan_guide is mentioned in page 186.

Anonymous  May 09, 2012