REPLACE 显示列名无效的错误

REPLACE showing error that the column name is invalid

您好需要替换存储在 2016 SQL 服务器数据库中的静态 HTML 文档的名称。

table 名称是 contract.departmentInfo 并且包含所有 HTML 的列称为 staticHtmlForAdmins

所以我尝试使用 REPLACE 函数,但它一直告诉我列名无效,即使我知道它是正确的名称。

这是我的 SQL:

SELECT REPLACE(staticHtmlForAdmins,'2019_Rule_additions.pdf','New_Rules_2020_2021.docx');  
from contract.departmentInfo
where deptID = 374352

上面的方法不起作用有什么原因吗?

谢谢!

错误是正常的

SELECT REPLACE(staticHtmlForAdmins,'2019_Rule_additions.pdf','New_Rules_2020_2021.docx');  
from contract.departmentInfo
where deptID = 374352

移除;在

之后
REPLACE(staticHtmlForAdmins,'2019_Rule_additions.pdf','New_Rules_2020_2021.docx')