I just reviewed a script that had 3 major problems.
1. It created a #table and then immediately truncated it.
2. It passed in a var into the sp and then hardcoded the value a few lines later. The passed-in value will never be read.
3. It did the following operation.
Declare @var decimal(18,2)
Set @var = select count(*) from table
Really? Come on people let’s think about what we’re doing.
Watch my free SQL Server Tutorials at:
Read my book reviews at:
Blog Author of:
Database Underground – http://www.infoworld.com/blogs/sean-mccown
Follow my Twitter:
- Sean McCown
- I am a Contributing Editor for InfoWorld Magazine, and a frequent contributor to SQLServerCentral.com as well as SSWUG.org. I live with my wife and 3 kids, and have practiced and taught Kenpo for 22yrs now.
- ▼ July (12)