I know you could Truncate a Table or Table variable but is there a way to also truncate a variable ?
DECLARE @HiddenMe NVARCHAR(MAX)
SET @HiddenMe = (select XYZ.abc)
If LEN(@HiddenME) >= 1800000 Then would like to truncate @HiddenMe .
Please let me know . FYI, am using sql 2008