Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
tsql:print_big [2019/03/23 12:24]
admin
tsql:print_big [2020/02/26 18:47] (current)
admin [Print big]
Line 37: Line 37:
   SET @lastLineSep = CHARINDEX(REVERSE(@lineSep),​ REVERSE(SUBSTRING(@text,​ @off, @maxLen + LEN(@lineSep))))   SET @lastLineSep = CHARINDEX(REVERSE(@lineSep),​ REVERSE(SUBSTRING(@text,​ @off, @maxLen + LEN(@lineSep))))
   SET @len = @maxLen - CASE @lastLineSep WHEN 0 THEN 0 ELSE @lastLineSep - 1 END   SET @len = @maxLen - CASE @lastLineSep WHEN 0 THEN 0 ELSE @lastLineSep - 1 END
- +  ​PRINT SUBSTRING(@text,​ @off, @len)
-  --PRINT '​@off='​ + CAST(@off AS VARCHAR) + ' @len=' + CAST(@len AS VARCHAR) + ' @lastLineSep='​ + CAST(@lastLineSep AS VARCHAR) +
-  ​PRINT SUBSTRING(@text,​ @off, @len) --+ '​**END**'​ +
   SET @off += CASE @lastLineSep WHEN 0 THEN 0 ELSE LEN(@lineSep) END + @len   SET @off += CASE @lastLineSep WHEN 0 THEN 0 ELSE LEN(@lineSep) END + @len