SQL Server Performance

Write Function in SQL Server 2005

Discussion in 'Other SQL Server Blogs around the Web' started by Anonymous, Oct 30, 2007.

  1. Anonymous New Member

    One of the functions available in SQL Server 2005 that allows you to update a character column of size max is WRITE Function. In fact we can consider this as alternate to STUFF function which wont work for columns with Max length declare @t table(v nvarchar(max)) insert into @t select 'test is test' update @t set v=stuff(v,1,4,'This') select v from @t go declare @t table(v nvarchar(max)) insert into @t select 'test is test' update @t set v.write('test',0,4) select v from @t PS You can use STUFF function...(<a href="http://sqlserver-qa.net/blogs/t-sql/archive/2007/10/30/2631.aspx">read more</a>)<img src="http://sqlserver-qa.net/aggbug.aspx?PostID=2631" width="1" height="1">

Share This Page