Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sqlcl and json format

user10621655May 24 2018 — edited May 27 2018

Hi,

I'm new with Sqlcl.

I'm trying to export a table with case-sensitive column name, but the spool in json format put column name in lower-case

{"results":[{"columns":[{"name":"colOne","type":"VARCHAR2"},{"name":"colTwo","type":"VARCHAR2"}],"items":

[

{"colone":"1234567890","coltwo":"TestValue"}

]}]}

the database version is 11.2.0.4.0

SqlCl version: 18.1.1.0

Any suggestions?

It is a bug ?

Thanks in advance

Francesco

Comments

Gaz in Oz

Please supply a repeatable test case.

user10621655

Hi,

once connected to db wit sqlcl:

CREATE TABLE T_PINO

(

  "colOne"  VARCHAR2(10 BYTE),

  "colTwo"  VARCHAR2(10 BYTE)

);

Insert into T_PINO ("colOne", "colTwo") Values  ('1234567890', 'TestValue');

COMMIT;

set sqlformat json

select * from T_PINO;

{"results":[{"columns":[{"name":"colOne","type":"VARCHAR2"},{"name":"colTwo","type":"VARCHAR2"}],"items":

[

{"colone":"1234567890","coltwo":"TestValue"}

]}]}

Thanks

Glen Conway

You have definitely found a bug.  Checking some earlier versions of SQLcl and SQL Developer that support set sqlformat, all have the same problem.  We can only hope this is something that will get fixed for 18.2.

user10621655

... a trouble shared is a trouble halved ...thanks a lot

1 - 4

Post Details

Added on May 24 2018
4 comments
679 views