Thanks Martin: 
Can you (or anyone) give me an example of that query?

regards.



Alberto Ferrari
Skype: support-starconnecting


2016-05-02 2:24 GMT-03:00 Martin Kersten <martin@monetdb.org>:
On 02/05/16 01:03, Alberto Ferrari wrote:
Can anyone help with json.filters?
I have this example table ...

CREATE TABLE tblJson (
"id" INT,
"json_data" JSON,
  );

  ... with these values...

INSERT INTO tblJson (id, json_data)
VALUES
(1, '{"data":{"time":"2015-10-09 10:36:35","others":"xxx"}}'),
(2, '{"data":{"time":"2015-10-09 12:18:20","others":"yyy"}}'),
(3, '{"data":{"time":"2015-12-30 16:31:22","others":"zzz"}}');
The data is ok, I can select the rows, it's ok. Also I can select only the "time" field, like this...
SELECT json.filter(json_data, 'data.time') FROM tblJson;

But now I want to filter the content in "json_data" specific field, i.e.
SELECT all the rows where  "time like '2015-10-09%'" , or maybe "time = '2015-10-09 12:18:20'"
of course not, SQL does not know anything about the Json internal structure.
You first have to extract the time component and then apply the like operation.


I tried but can't do it. Any help? Thanks!





_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list


_______________________________________________
users-list mailing list
users-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/users-list