Displaying long values while maintaining their formatting in SQL Server Management Studio is not as straight forward as you might think. Today, I show you three different ways of printing lengthy field or variable values that will work in SQL Server 2008+.
Be sure to subscribe and watch new SQL Server videos every week: https://www.youtube.com/c/DataWithBer...
Blog post with demo code: https://bertwagner.com/2018/08/07/dis...
Erik Darling's T-SQL Tuesday #104 post with more tips on working with dynamic SQL: https://www.brentozar.com/archive/201...
Yildirim Kocdag's stored procedure for printing long strings: https://www.codeproject.com/Articles/...
Follow me on Twitter:
/ bertwagner