I saw the below syntax in a training video and I was wondering what this is called and which methods can we use on a variable?
DECLARE @text VARCHAR(max);
SET @text = REPLICATE(CAST('asdfasdf' as varchar(max)),8000);
SET @text.write('zzzzzzzz',0,8);
SELECT @text
the value stored in the variable is 'zzzzzzzzasdfasdf...'