ALTER TRIGGER [dbo].[t_remove_callDesc_multiLineFeeds] ON - TopicsExpress



          

ALTER TRIGGER [dbo].[t_remove_callDesc_multiLineFeeds] ON [dbo].[CallLog] FOR INSERT AS BEGIN declare @string varchar(max),@index int select @string = c.calldesc FROM dbo.callLog c, INSERTED i where c.callid = i.callid select @string = REPLACE(@string, char(10)+, char(10)) select @index = charIndex(char(13)+char(10)+char(13)+char(10), @string) while @index > 0 BEGIN select @string = REPLACE(@string,char(13)+char(10)+char(13)+char(10) , char(13)+char(10)) select @index = charIndex(char(13)+char(10)+char(13)+char(10), @string) END UPDATE dbo.callLog SET dbo.callLog.callDesc = @string FROM INSERTED where INSERTED.CallID = callLog.CallID END GO
Posted on: Wed, 17 Jul 2013 20:30:29 +0000

Trending Topics



n-height:30px;">
Everyone, who gave their time to mix, fill, stuff, top and help in

Recently Viewed Topics




© 2015