3 回答

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

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

TA貢獻(xiàn)1844條經(jīng)驗(yàn) 獲得超8個(gè)贊
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功能,我得到一個(gè)錯(cuò)誤
參數(shù)數(shù)據(jù)類型ntext對(duì)于函數(shù)的參數(shù)1無(wú)效replace。
- 3 回答
- 0 關(guān)注
- 560 瀏覽
添加回答
舉報(bào)