declare @id numeric(18,0)

DECLARE ResultSet_News CURSOR FOR

SELECT Id FROM product_ta_product;

OPEN ResultSet_News;

FETCH NEXT FROM ResultSet_News into @Id

WHILE @@FETCH_STATUS = 0

BEGIN

print @id

DECLARE @CommentVar nvarchar(4000);

-- Read in existing comments from COMMENTS column in view named MyView

SELECT @CommentVar = product_description FROM product_ta_product WHERE id=@id;

-- Insert text a top of comment (example is a running history with most recent first)

SET @CommentVar = replace(@CommentVar,'http://www.4wdcc.com/admin','http://www.leods.com/admin');

-- Now go update the field

UPDATE product_ta_product SET product_description = @CommentVar WHERE id=@id;

 

FETCH NEXT FROM ResultSet_News into @Id

END;

CLOSE ResultSet_News;

DEALLOCATE ResultSet_News;

相关文章:

  • 2021-11-22
  • 2021-04-14
  • 2021-12-03
  • 2022-12-23
  • 2022-12-23
  • 2021-11-20
  • 2022-02-10
猜你喜欢
  • 2022-12-23
  • 2021-12-06
  • 2022-12-23
  • 2021-06-08
  • 2021-07-12
  • 2021-10-21
  • 2021-05-25
相关资源
相似解决方案