Skip to main content

Beginning SQL Server 2005 Programming

Robert Vieira

ISBN: 978-0-764-58433-6

Feb 2006

720 pages

Select type: Paperback

Product not available for purchase


  • After a quick primer on database design basics and the SQL query language (for those programmers who may be building their first database application), this book provides an overview of SQL Server itself, which has been dramatically redesigned with the 2005 release
  • Once readers have grasped the fundamentals of database design and SQL concepts, they will then learn how to implement those concepts with Microsoft SQL Server 2005
  • Addresses creating and changing tables, managing keys, database normalization, writing scripts, working with stored procedures, programming with XML, and using SQL Server reporting and data transformation services
  • The companion Web site provides all of the code found in the book

Related Resources


Chapter 1: RDBMS Basics: What Makes Up a SQL Server Database?

Chapter 2: Tools of the Trade.

Chapter 3: The Foundation Statements of T-SQL.

Chapter 4: JOINs.

Chapter 5: Creating and Altering Tables.

Chapter 6: Constraints.

Chapter 7: Adding More to Our Queries.

Chapter 8: Being Normal: Normalization and Other Basic Design Issues.

Chapter 9: SQL Server Storage and Index Structures.

Chapter 10: Views.

Chapter 11: Writing Scripts and Batches.

Chapter 12: Stored Procedures.

Chapter 13: User Defined Functions.

Chapter 14: Transactions and Locks.

Chapter 15: Triggers.

Chapter 16: A Brief XML Primer.

Chapter 17: Reporting for Duty, Sir!: A Look At Reporting Services.

Chapter 18: Getting Integrated With Integration Services.

Chapter 19: Playing Administrator.

Appendix A: Exercise Solutions.

Appendix B: System Functions.

Appendix C: Finding the Right Tool.

Appendix D: Very Simple Connectivity Examples.

Appendix E: Installing and Using the Samples.


Download Code
Code downloads for this title are available here.
Code Downloads
Code downloads for this title are available here.
Download Code
Code downloads for this title are available here.
Code Downloads
Code downloads for this title are available here.
Download missing "TRY/CATCH Blocks" section for page 378
Download the missing "TRY/CATCH Blocks" section for page 378
Chapter-specific source code
ChapterPageDetailsDatePrint Run
Error in Reference
...pubs and Northwind are only installed as part of a separate installation that can be downloaded from Microsoft. See Appendix F (online) for more information on how to get them installed on your practice system. There is no Appendix F. It's Appendix E.

Code Replacement
Code Replacement for this title can be found at:,descCd-download_code.html

11Error in Text
Text reads:
"(...the same way we have constraints, which are objects, and rules, which are not objects but metadata.)"

Should read:
"(...the same way we have rules, which are objects, and constraints, which are not objects but metadata.)"

28, 31Error in Figures
Page 28, the connect to server figure reflects connecting to server
should be:


Page 31, Try it out figure shows Schweitzer
should be:

34-38Error in Figure References
"Results In Text" shown in 2-11, should be 2-12 "Show Execution Plan" shown in 2-12, should be 2-13 "re-run the query" shown in 2-13, should be 2-14 Figure 2-14 shows how to select the AdventureWorks database, should not be there.

54Error in Instruction
SELECT OrderID, SUM(Quantity)
From [Order Details]
Where OrderID BETWEEN 11000 AND 11002

Text reads, "If we didn't supply the GROUP BY clause, the SUM would
have been of all the values in all of the rows for the named column."


If you remove the "GROUP BY OrderID" line, an error occurs.

INSTEAD should be:
SELECT SUM(Quantity)
From [Order Details]
Where OrderID BETWEEN 11000 AND 11002

55Error in Text
85 X 3 = 28.33

should be:
85 / 3 = 28.33

111Typo in Text
At the end of the 4th paragraph:

(and any other SQL Server object for that matter

Should be

(and any other SQL Server object for that matter).

146-147Error in Text
If you look at pages 146 - 147 at figures 5-6 and 5-8, you will see the CustomerName field is set to varbinary(30).

The images should show it is varchar(30).

153Error in Text
First paragraph under Entity Constraints reads:
"... value for a column or a combination of problems."

Should read:
"combination of columns"

193Typo in Text
In the first sentence under the "Correlated Subqueries in the SELECT List" heading:

Subqueries can also used...

Should be

Subqueries can also be used...

233Error in Figures 8-13 adn 8-21
Line reads: "I can then add in my new column, and reset the Primary Key as shown in Figure 8-13 (select both rows, right click and choose Set Primary Key)." Now, when I do this, my table shows key icons on both the CustomerID column and the Sequence columns, while the example Figure 8-13 (and subsequent figure 8-21) still shows the Key icon only on the CustomerID column. This leads me the figure examples should show both key icons.

336Error in Text
Code paragraph says:
"/* First, we’ll declare to variables."

should be:
"/* First, we’ll declare two variables."

619Error in Chapter Reference
the CONTAINSTABLE & FREETEXTTABLE System Functions refer to more information about usage of each in Chapter 26.

Full Text Search is only covered in the Professional title (9780764584343 Professional SQL Server 2005 Programming); there is no chapter 26 in Beginning.