alejoup
8/16/2018 - 9:31 PM

Alternative to sp_helptexp

CREATE PROC HELPTEXT2  @PROCEDURE VARCHAR(50)

AS 

BEGIN

SET NOCOUNT ON

DECLARE @results table ([Text] nvarchar(255))

INSERT @results

Exec sp_helptext @PROCEDURE

UPDATE  @results SET [Text]=REPLACE(REPLACE([Text], NCHAR(10), N''), NCHAR(13), N'')

SELECT *

FROM @results


END