declare @LongName varchar(max) --set @LongName = '' -- --select @LongName = @LongName + ' ' + ISNULL(FirstName,'') from Registration --select @LongName as LongName set @LongName = '' select name from sys.procedures order by name SELECT @LongName = @LongName + char(13) + OBJECT_DEFINITION(OBJECT_ID) from sys.procedures where Name Like 'Registration%' print @LongNameI only get the first N number of lines. Is there a way to get whole code of my procedures into some convenient text format without opening each one using SSMS?