Goal :- json_extract does not exist error.
我确实有这样的消息体.
- < message type = "chat"
- to = "socialapp_233@22.52.258.256"
- from = "socialapp_6@22.52.258.256/9fs4kgn090" > < body > {
- "opponent_xmpp_id": "socialapp_233@22.52.258.256","latest_message_id": "6233"
- } < /body><active>http:/ / jabber.org / protocol / chatstates < /active></message >
我试图提取opponent_xmpp_id和latest_message_id.
因为我写了一个像下面的查询.
- SELECT LEFT(ExtractValue( stanza,"//@from" ),LOCATE("@",ExtractValue( stanza,"//@from" )) - 1),LEFT(ExtractValue( stanza,"//@to" ),"//@to" )) - 1),ExtractValue(stanza,"//body"),"//@chattype"),TRIM(BOTH '"' FROM json_extract(ExtractValue(stanza,'$.opponent_xmpp_id')) AS opponent_xmpp_id,json_extract(ExtractValue(stanza,'$.latest_message_id') AS latest_message_id
- FROM
- ofOffline
导致错误
1305 – FUNCTION databaseName.json_extract does not exist