Another option is to use the templates in Query Analyzer. They would help with the formatting.
I would recommend something like "Professional SQL Server 2000 Programming" if you are just starting out with stored procedures and T-SQL.
Patrick
Quand on parle du loup, on en voit la queue