Generating T-SQL select statements for all tables