Paul White's blog series will pretty much any question you could ever think of on this.
http://www.sqlservercentral.com/articles/SQL+Server+2008/71019/
For better, quicker answers on T-SQL questions, read
Jeff Moden's suggestions.[/url]
"Million-to-one chances crop up nine times out of ten." ― Terry Pratchett, Mort