Try this
http://www.sqlservercentral.com/articles/T-SQL/63681/
It should answer most of your questions.
Greg
_________________________________________________________________________________________________
The glass is at one half capacity: nothing more, nothing less.