On 03/27/2015 12:30 PM, Eli Murray wrote:
Thanks to you all for the replies. Adrian, your solution is working for
me without errors but it's not actually inserting anything. I'll keep
fiddling with it and see if I can get what I want but I'm confident now
that I'm on the right path. As a backup,
On Fri, Mar 27, 2015 at 12:30 PM, Eli Murray
wrote:
> Thanks to you all for the replies. Adrian, your solution is working for me
> without errors but it's not actually inserting anything. I'll keep fiddling
> with it and see if I can get what I want but I'm confident now that I'm on
> the right p
Thanks to you all for the replies. Adrian, your solution is working for me
without errors but it's not actually inserting anything. I'll keep fiddling
with it and see if I can get what I want but I'm confident now that I'm on
the right path. As a backup, I did what I wanted to in Javascript and wro
On March 27, 2015 11:38:42 AM David G. Johnston wrote:
> On Fri, Mar 27, 2015 at 11:31 AM, Jan de Visser wrote:
> > On March 27, 2015 01:12:52 PM Eli Murray wrote:
> > > ERROR: syntax error at or near "json_build_object"
> > > LINE 1: insert into json(data) json_build_object(SELECT DISTINCT dep..
On 03/27/2015 11:12 AM, Eli Murray wrote:
I'm running psql --version 9.4.1
Also, it may be worth noting that rawdata.deptname and rawdata.deptcode
are both text data types.
The errors I'm getting are:
ERROR: syntax error at or near "json_build_object"
LINE 1: insert into json(data) json_build
On 27 March 2015 at 19:12, Eli Murray wrote:
> I'm running psql --version 9.4.1
>
> Also, it may be worth noting that rawdata.deptname and rawdata.deptcode
> are both text data types.
>
> The errors I'm getting are:
>
> ERROR: syntax error at or near "json_build_object"
> LINE 1: insert into jso
On Fri, Mar 27, 2015 at 11:31 AM, Jan de Visser wrote:
> On March 27, 2015 01:12:52 PM Eli Murray wrote:
> > ERROR: syntax error at or near "json_build_object"
> > LINE 1: insert into json(data) json_build_object(SELECT DISTINCT dep...
>
> You may want to review the syntax of the INSERT command,
On 03/27/2015 11:12 AM, Eli Murray wrote:
I'm running psql --version 9.4.1
Also, it may be worth noting that rawdata.deptname and rawdata.deptcode
are both text data types.
The errors I'm getting are:
ERROR: syntax error at or near "json_build_object"
LINE 1: insert into json(data) json_build
On March 27, 2015 01:12:52 PM Eli Murray wrote:
> ERROR: syntax error at or near "json_build_object"
> LINE 1: insert into json(data) json_build_object(SELECT DISTINCT dep...
You may want to review the syntax of the INSERT command, i.e. this doesn't
have anything to do with JSON:
INSERT INTO fo
I'm running psql --version 9.4.1
Also, it may be worth noting that rawdata.deptname and rawdata.deptcode are
both text data types.
The errors I'm getting are:
ERROR: syntax error at or near "json_build_object"
LINE 1: insert into json(data) json_build_object(SELECT DISTINCT dep...
and
ERROR:
On 03/27/2015 10:40 AM, Eli Murray wrote:
Hi All,
I'm trying to create an array of JSON objects from an existing table.
I've created a new table:
"CREATE TABLE json(data json[]);"
Now i need to populate it with key value pairs from another table. I'd
like to create the objects to look like:
{
Hi All,
I'm trying to create an array of JSON objects from an existing table. I've
created a new table:
"CREATE TABLE json(data json[]);"
Now i need to populate it with key value pairs from another table. I'd like
to create the objects to look like:
{ "code": rawdata.deptcode, "name": rawdata.d
12 matches
Mail list logo