Skip to content

Tag: json

Oracle 12c Json split

This is how I am getting result in Oracle 12c Id Start Date Range End Date Range 1 [ “2019-01-07″,”2019-02-17″,”2019-03-17”] [ “2019-01-14″,”2019-02-21″,”2019-03-21”] And I want it Id Start Date Range End Date Range 1 2019-01-07 2019-01-1…

Put a json inside another json on Oracle 19

i have the next problem. I need create a json from a table that contain another json inside in one of the columns Having this: i try with this query: But the result is not correct: Must be something like: There is a way to get the correct result? Regards. Answer after see examples and see the resuslts. I know

Get rid of all empty strings values in jsonb | Postgres

I have rather abstract question on PostgreSQL jsonb data. For example I have a table called… table_one, where I have a column: In 100% cases in contains flat json structure like example: might be different length or null but always flat. My goal is like that. Whenever I select this column I need to somehow co…

Store hourly data efficient way

There is a requirement to store hourly data in SQL Server 2016 and retrieve. It’s an OLTP database. I will explain with an example: we need to capture temperature of each city of a country and store on hourly basis. What would be the best and efficient design to do this. The data would be stored for a y…

Count values between double quotes and brackets

How can I group by and count the values separated by double quotes between the brackets? I have 400K rows, so I’m also concerned about performance. Desired output: Answer Do you mean something like this? (The with clause is only for testing – remove it, and use your actual table and column names i…

Transform JSON rows into PostgreSQL Table

I have a table in my database that returns me some columns. One of them is a list of JSONs that are, in fact, other tables, but in JSON format. The image belows show an example. I want to transform each row of that column “data” into separate tables, because I need specific information inside each…