消息207,级别16,状态1,过程PRMAUD_PROJRISK,行24无效的列名称'wbs_id'

时间:2014-02-25 13:23:12

标签: sql sql-server sql-server-2008

我收到以下错误:消息207,级别16,状态1,过程PRMAUD_PROJRISK,第24行 列名称'wbs_id'无效。当我运行以下存储过程

 DECLARE RiskCursor CURSOR LOCAL FOR SELECT risk_id, risk_desc from PROJRISK
OPEN RiskCursor
DECLARE @riskID INT, @HTMLText VARCHAR(4000), @Start INT, @End INT, @Length INT
FETCH NEXT FROM RiskCursor INTO @riskID, @HTMLText
WHILE (@@FETCH_STATUS = 0)
BEGIN
SET @Start = CHARINDEX('<',@HTMLText)
SET @End = CHARINDEX('>',@HTMLText,CHARINDEX('<',@HTMLText))
SET @Length = (@End - @Start) + 1
WHILE @Start > 0 AND @End > 0 AND @Length > 0
  BEGIN
    SET @HTMLText = STUFF(@HTMLText,@Start,@Length,'')
    SET @Start = CHARINDEX('<',@HTMLText)
    SET @End = CHARINDEX('>',@HTMLText,CHARINDEX('<',@HTMLText))
    SET @Length = (@End - @Start) + 1
  END
SET @HTMLText = LTRIM(RTRIM(@HTMLText))
UPDATE PROJRISK SET risk_desc = @HTMLText where risk_id = @riskID 
FETCH NEXT FROM RiskCursor INTO @riskID, @HTMLText 
 END
 CLOSE RiskCursor
 DEALLOCATE RiskCursor
 GO
 go 

请帮助解决错误

1 个答案:

答案 0 :(得分:1)

根据提供的信息,您可能在projrisk表格上获得了无效的触发器。