Decimal(18,2)?!?

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:
http://MidnightDBA.ITBookworm.com

Read my book reviews at:
www.ITBookworm.com

Blog Author of:
Database Underground – http://www.infoworld.com/blogs/sean-mccown

Follow my Twitter:

http://twitter.com/MidnightDBA

2 thoughts on “Decimal(18,2)?!?”

  1. Your blog keeps getting better and better! Your older articles are not as good as newer ones you have a lot more creativity and originality now keep it up!

Comments are closed.