Recently i explored a wonderful option provided in SQL Server Management Studio. SSMS allows to generate script for any operation performed through its GUI. It is awesome and provides you a comprehensive and authentic T-SQL code reference. You may save the GUI tasks performed in form of .sql files. Such code may be reused in daily tasks or scheduled jobs.
Click here to read my article for details of using this feature of SSMS.