from the have-they-installed-SQL Server 2000-yet? dept
Date:
2007-04-14 00:46:35
From:
Coding SQL Server since 6.5 but now running SQL Server 2005
Rating:
The SQL Hacks book claims to support SQL Server 2005, however many of the code examples for SQL Server use SQL Seerver 7 syntax completely ignoring the proper way to write T-SQL for SQL Server 2K or 2005.
For instance, the book still uses the outdated @@Identity to retreive the last identity value. This was replaced 7 years ago by the improved identitiy_scope() function. Using @@identity risks getting the wrong value if a trigger inserts new rows. No one who write T-SQL code uses @@identity anymore.
Speaking of functions, the book also ignores T-SQL user-defined function which were introduced in SQL Server 2000. (even in the Can you write functions hack!)
Will the T-SQL code run? yes. Is it current code? in many places no.
Not only is the T-SQL poorly written code, but the hacks themselves are hit and miss. Some are clever, others are simply a first try at a task without really workgin it through.
More disturbing is the fact that I've entered this review before, but O'Reilly deletes it. hmmmm.
Showing messages 1 through 1 of 1.
from the have-they-installed-SQL Server 2000-yet? dept
2007-06-22 11:42:52
rikishipabst
[View]
I think you should read the preface where the author clearly states that this book is not designed to house clean code or show off the best design aspects but rather to provide hacks that get the job done. I think you should really be careful what you post rather than burn up a book that has saved so many others time and provided ideas on how to get things done.