I need to generate the folowing JSON payload (shortened) from a table in SQL Server. Please note the dot in the property name. This is a special syntax called OData.
My json is of the format [“a”,”b”,”c”]. I want to write a sql query such that
I have CSV import data that comes from multiple vendors with 50+ different columns, and each vendor has slightly different naming.
I was originally going to ask this on SO, but thought better of it, so I am trying my hand here.
This is a follow-up to:
I have a table where I save in JSON format the quantity that exit and return of a product.
The data saved in the two columns
in_quantity is in array format.
I have the following table:
The columns of the CSV are of the format
text (can include empty lines),
date and a JSON array of strings (something like
['a', 'b', 'c']. I’ve been trying to copy that CSV to a PostgreSQL table (using
copy_expert, which simply executes the given SQL
COPY command, if that matters)
Using: Postgres 14.2.
Objective: To get a list of all distinct countries in my table.
I have a table with 3 columns in Postgres 14.2: