开发者

help with sqlite replace function

am trying to update my database table that looks like this

name  | file_n开发者_JS百科ame
----------------
name1 | name1\data

what i want to do is, to replace all the name1 from name found in file_name column with empty string

update cache set
file_name=replace(file_name,name,'')
where file_name like '%'||name||"%'"

When i execute the query above, i get an empty recordset.

can anybody help me fix this


UPDATE cache SET file_name=replace(file_name, name, '');

Worked without the WHERE clause.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜