I am using Audit.Net library to log EntityFramework actions into a database (currently everything into one AuditEventLogs table, where the JsonData column stores the data in the following Json format: Me and my team has a main aspect to achieve: Being able to create a search page where administrators are able to tell who changed what did they change when
Tag: json-query
How to loop array of objects from table column?
Table columns : My table column details has json object like I want to write a query which will give me records like below : I tried with RESULT WITH COUNT : EXPECTED Answer To get all the objects from json array along with other columns you can use OpenJson() and Cross Apply as below: Query: Output: id cnt name
GET last element of array in json column of my Transact SQL table
Thanks for helping. I have my table CONVERSATIONS structured in columns like this : [ ID , JSON_CONTENT ] In the column ID i have a simple id in Varchar In the column JSON_CONTENT i something like this : I would like to query and get the id and the last element of exchanges : [ ID , LAST_ELT_IN_EXCHANGE_IN_JSON_CONTENT] I
how to fix SQL server Json text is not properly formatted. Unexpected character is found at position 151
Im working on a table that has a column in JSON format and I want to extact the coordinate value from that column. So I run the following code: And I get the following error after 5 mins of running Msg 13609, Level 16, State 1, Line 27 Json text is not properly formatted. Unexpected character ‘”‘ is found at