我有一个包含2列的表:title和param,其值如下:
标题:教学
-参数:
{ "ufield926":"34",
"ufield927":"Sud",
"ufield928":"Ara",
"ufield929":"Mecca",
"ufield930":"1\/1\/1983",
"ufield933":"011",
"ufield934":"Mub",
"ufield943":"SU\/HI\/14",
"ufield944":"Average",
"ufield946":"Female"
}
我想提取“ ufield943”之后的代码:仅SU / HI / 14,并将其与title列中的值连接起来,如下所示:
->教学(SU / HI / 14)
这是我尝试过的查询:
update tbl set title = CONCAT_WS(title,' ', '(' , (select *, substring( params, locate('ufield943', params) + 12, locate('ufield944', params) - locate('ufield943', params) - 15 )),')') from tbl;
每次运行代码时,都会收到以下错误“ ERR_PARSE_ERROR”。