The Data in the column is stored in this Format. I am storing Data in JSON format in column
{"item": {
"actor":{
"time":"2011-08-21 21:56:37",
"ip":"127.0.0.1",
"id":"2010072123522251",
"email":"abc@abc.com",
"session_id":"c05e3e61a19650b4ca12a21c2e34df5f",
"loggedout":""},
"action":{
"name":"publish",
"text":"a_id=11714" ,
"a_id":"11714"
}
}}
Now i want the Result like this
time ip id email session_id
2011-08-21 21:56:37 127.0.0.1 2010072123522251 2010072123522251 2010072123522251
I used the query like this
SUBSTRING(msg,LOCATE('a_id',msg)+5,(LOCATE('"',msg)+2) ) AS answer_id
But it is not returning me good results. Some results are terminated. Please suggest
I did it using Python text processing. as there is no good way via Sql.