I hesitate to judge not knowing the app but does anyone else think this method of cleanup might be somewhat taxing to the server?
Trigger fires an SP with multiple DELETE's for every insert, update, or delete on any table?
I'm guessing this is not an OLTP app?
Might a timed SQL Agent job be...
You could also use the COALESCE function to achieve a similar result:
dbo.ConcatDesc (@OutreachID int)
returns varchar(1000)
AS
BEGIN
Declare @Str as varchar(1000)
SELECT @Str = COALESCE(@Str + ', ', '') + Descript
FROM myTable
WHERE OutreachID=@OutreachID
RETURN @Str
END
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.