Last Updated: February 25, 2016
·
886
· gshutler

Getting values from VARCHAR(MAX) fields in Management Studio

If you have a field you need to inspect that's hitting the limit of 65523 characters this will (usually) dump the field out for you without having to write a little program:

declare @field varchar(max)

select @field = field from atable where pk = 'akey'

print @field