Hi,
im trying to realize something like this:
DECLARE @id int
declare @cont varchar(max)
declare @temp varchar(max)
DECLARE curs CURSOR FOR SELECT id, [content] FROM [dbo].[Contents]
OPEN curs
FETCH NEXT FROM curs into @id, @cont
WHILE @@FETCH_STATUS = 0
BEGIN
SET @temp = replace(@cont, @param_ReplaceThis, @param_WithReplacement)
update [dbo].[Contents]
set [Content] = @temp
where id = @id;
FETCH NEXT FROM curs into @id, @cont;
END;
CLOSE curs;
DEALLOCATE curs;
but i always get the errormessage that it's not allowed to use 'UPDATE' within a function... i only that this stuff is working fine on Oracle...