SQLServerCentral.com / SQL Server 2008 - General / SQL Server 2008 / Using Varchar(max) to add to a field? / Latest PostsInstantForum.NET v2.9.0SQLServerCentral.comhttp://www.sqlservercentral.com/Forums/notifications@sqlservercentral.comTue, 31 Mar 2015 15:23:53 GMT20RE: Using Varchar(max) to add to a field?http://www.sqlservercentral.com/Forums/Topic1400544-391-1.aspxturns out what you suggested did work after all, I'd like to thank you for your helpThu, 27 Dec 2012 04:21:46 GMTmick burdenRE: Using Varchar(max) to add to a field?http://www.sqlservercentral.com/Forums/Topic1400544-391-1.aspxPost your code with the varchar(max) used and post the exact error messageThu, 27 Dec 2012 04:12:37 GMTGilaMonsterRE: Using Varchar(max) to add to a field?http://www.sqlservercentral.com/Forums/Topic1400544-391-1.aspx[quote][b]GilaMonster (12/27/2012)[/b][hr]You shouldn't be using TEXT in the first place, it's an old SQL 2000 data type, included only for backward compatibility. Use Varchar(max)[/quote]Varchar(Max) isn't allowed in my situation eitherThu, 27 Dec 2012 04:04:12 GMTmick burdenRE: Using Varchar(max) to add to a field?http://www.sqlservercentral.com/Forums/Topic1400544-391-1.aspxYou shouldn't be using TEXT in the first place, it's an old SQL 2000 data type, included only for backward compatibility. Use Varchar(max)Thu, 27 Dec 2012 04:01:52 GMTGilaMonsterUsing Varchar(max) to add to a field?http://www.sqlservercentral.com/Forums/Topic1400544-391-1.aspxMerry Holidays everyone, I've created a basic table which includes a text field. I then created a SP which basically read the text field and then added to the same field, the problem is I get an error that says I can't use TEXT or Varchar(Max), is there a way round this?Table[code]CREATE TABLE KLN(RecId INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,Dte DATETIME,machineid VARCHAR(50),Userid VARCHAR(50),memo text)[/code]Stored Procedure[code]CREATE PROCEDURE [dbo].[Save_kln]@sDte as datetime,@smachineid as varchar(50),@sUserid as varchar(50),@smemo as textASDECLARE @sRESULTS varchar(MAX)if exists (select * from [kln] where [dte] = @sdte and Userid = @Suserid)beginset @sRESULTS = (select memo from [kln] where [dte] = @sdte and Userid = @Suserid)update [kln] set memo = @sRESULTS + @smemo where [dte] = @sdte and Userid = @SuseridendelsebeginINSERT INTO [kln] (dte,machineid,userid,memo) VALUES (@sdte,@smachineid,@suserid,@smemo)end[/code]Thu, 27 Dec 2012 03:56:52 GMTmick burden