3 回答

TA貢獻(xiàn)1155條經(jīng)驗(yàn) 獲得超0個贊
這很簡單:
update my_table
set path = replace(path, 'oldstring', 'newstring')

TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超9個贊
我嘗試了上面的方法,但沒有得到正確的結(jié)果。以下是一項(xiàng):
update table
set path = replace(path, 'oldstring', 'newstring') where path = 'oldstring'

TA貢獻(xiàn)1844條經(jīng)驗(yàn) 獲得超8個贊
UPDATE CustomReports_Ta
SET vchFilter = REPLACE(CAST(vchFilter AS nvarchar(max)), '\\Ingl-report\Templates', 'C:\Customer_Templates')
where CAST(vchFilter AS nvarchar(max)) LIKE '%\\Ingl-report\Templates%'
沒有該CAST功能,我得到一個錯誤
參數(shù)數(shù)據(jù)類型ntext對于函數(shù)的參數(shù)1無效replace。
- 3 回答
- 0 關(guān)注
- 553 瀏覽
添加回答
舉報(bào)