sql server - How to retrieve as a text the value of a very long varcharmax in SSMS -
i can't find exact solution problem. have sql script creates long script in different steps. what is, along script, add new pieces of script varchar(max) using concatenation. final script long it's difficult me it. use following final instruction: select [processing-instruction(x)] = @myscript xml path(''), type; in way can manage quite long results result long seems ssms runs out of memory. i tried saving variable @myscript selecting , saving result text or file saves less 20k characters. have set xml max output length unlimited , seems work when click on result cell blue content (the xml script) ssms freezes. the nice thing appearently script generated quite fast (i logging print different steps) can't see results of efforts. is there way can hold of content of lengthy varchar(max) ? thanks create procedure selects variable output. select @myscript xmldata xml path(''), type; then go command line , execute: bcp "e...