Skip to Main Content

Is it possible to retrieve content only with 'sqlformat json output', i.e. not include metadata?

3272816Nov 8 2018 — edited Nov 9 2018

Are there any settings, or combination of settings, in sqlci that would eliminate metadata {"results"} - providing content only?

test case

drop table example;

create table example (pk numeric, description varchar2(50));

insert into example values (1, 'First');

insert into example values (2, 'Second');

commit;

set sqlformat json

select * from example;

What sqlci returns:

{"results":[{"columns":[{"name":"PK","type":"NUMBER"},{"name":"DESCRIPTION","type":"VARCHAR2"}],"items":

[

{"pk":1,"description":"First"}

,{"pk":2,"description":"Second"}

]}]}

Desired output:

{"pk":1,"description":"First"}

,{"pk":2,"description":"Second"}

Regards

Comments
Post Details
Added on Nov 8 2018
4 comments
130 views