T-SQL存储过程:替换页面部分的特殊标签

CREATE   PROCEDURE  REPLACE_MARK
AS
DECLARE
    
@AREAID   int
BEGIN
    
DECLARE  REPLACE_CURSOR  CURSOR   FOR
    
SELECT  AREAID  FROM  w_PublishChannelArea

    
OPEN  REPLACE_CURSOR;

    
FETCH   NEXT   FROM  REPLACE_CURSOR  INTO   @AREAID

    
WHILE   @@FETCH_STATUS = 0
    
BEGIN
        
UPDATE  w_PublishChannelArea  SET  EditingCode = (
            
REPLACE (( SELECT  EditingCode  FROM  w_PublishChannelArea  WHERE  AreaID = @AREAID ), ' 750920 ' , ' " ' ))
        
WHERE  AreaID = @AREAID
    
FETCH   NEXT   FROM  REPLACE_CURSOR  INTO   @AREAID
    
END ;
    
CLOSE  REPLACE_CURSOR;
    
DEALLOCATE  REPLACE_CURSOR;
END

你可能感兴趣的:(t-sql)