SQLcl, select statement, resultant formatting of the data doesn't abide by the heading column width
I am using oracle SQLcl: Release 4.2.0.
When I issue this sort of select statement:
column COLUMN_A format a8
column COLUMN_B format a8
column COLUMN_C format a8
column COLUMN_D format a8
set linesize 1300
select * from table1 where rownum <= 10 order by 1;
I have the following issue:
COLUMN_A COLUMN_B COLUMN_C COLUMN_D
-------- -------- -------- --------
data1 text1 string1 date1
data2 text2 string2 date2
data3 text3 string3 date3
The data in the table output doesn't abide by the columns shown in the heading. Is there a setting that I can use so that the data in the columns fit properly in the table's columns?
I ssh into the machine that is running Oracle, via the Terminal app on a MacBook.
oracle format width heading sqlcl
add a comment |
I am using oracle SQLcl: Release 4.2.0.
When I issue this sort of select statement:
column COLUMN_A format a8
column COLUMN_B format a8
column COLUMN_C format a8
column COLUMN_D format a8
set linesize 1300
select * from table1 where rownum <= 10 order by 1;
I have the following issue:
COLUMN_A COLUMN_B COLUMN_C COLUMN_D
-------- -------- -------- --------
data1 text1 string1 date1
data2 text2 string2 date2
data3 text3 string3 date3
The data in the table output doesn't abide by the columns shown in the heading. Is there a setting that I can use so that the data in the columns fit properly in the table's columns?
I ssh into the machine that is running Oracle, via the Terminal app on a MacBook.
oracle format width heading sqlcl
why format? try > set sqlformat ansiconsole
– Kris Rice
Nov 16 '18 at 2:47
Are you using a fixed format font?
– Barry McGillin
Nov 16 '18 at 12:19
add a comment |
I am using oracle SQLcl: Release 4.2.0.
When I issue this sort of select statement:
column COLUMN_A format a8
column COLUMN_B format a8
column COLUMN_C format a8
column COLUMN_D format a8
set linesize 1300
select * from table1 where rownum <= 10 order by 1;
I have the following issue:
COLUMN_A COLUMN_B COLUMN_C COLUMN_D
-------- -------- -------- --------
data1 text1 string1 date1
data2 text2 string2 date2
data3 text3 string3 date3
The data in the table output doesn't abide by the columns shown in the heading. Is there a setting that I can use so that the data in the columns fit properly in the table's columns?
I ssh into the machine that is running Oracle, via the Terminal app on a MacBook.
oracle format width heading sqlcl
I am using oracle SQLcl: Release 4.2.0.
When I issue this sort of select statement:
column COLUMN_A format a8
column COLUMN_B format a8
column COLUMN_C format a8
column COLUMN_D format a8
set linesize 1300
select * from table1 where rownum <= 10 order by 1;
I have the following issue:
COLUMN_A COLUMN_B COLUMN_C COLUMN_D
-------- -------- -------- --------
data1 text1 string1 date1
data2 text2 string2 date2
data3 text3 string3 date3
The data in the table output doesn't abide by the columns shown in the heading. Is there a setting that I can use so that the data in the columns fit properly in the table's columns?
I ssh into the machine that is running Oracle, via the Terminal app on a MacBook.
oracle format width heading sqlcl
oracle format width heading sqlcl
asked Nov 15 '18 at 19:59
Steve TSteve T
178
178
why format? try > set sqlformat ansiconsole
– Kris Rice
Nov 16 '18 at 2:47
Are you using a fixed format font?
– Barry McGillin
Nov 16 '18 at 12:19
add a comment |
why format? try > set sqlformat ansiconsole
– Kris Rice
Nov 16 '18 at 2:47
Are you using a fixed format font?
– Barry McGillin
Nov 16 '18 at 12:19
why format? try > set sqlformat ansiconsole
– Kris Rice
Nov 16 '18 at 2:47
why format? try > set sqlformat ansiconsole
– Kris Rice
Nov 16 '18 at 2:47
Are you using a fixed format font?
– Barry McGillin
Nov 16 '18 at 12:19
Are you using a fixed format font?
– Barry McGillin
Nov 16 '18 at 12:19
add a comment |
2 Answers
2
active
oldest
votes
Maybe upgrade?
Latest version (18.3)
drop table a8_format;
clear screen
create table a8_format (co11 varchar2(20), col2 varchar2(20), col3 varchar2(20), col4 varchar2(20));
insert into a8_format values ('data1', 'text1', 'string1', 'date1');
insert into a8_format values ('data2', 'text2', 'string2', 'date2');
insert into a8_format values ('data3', 'text3', 'string3', 'date3');
insert into a8_format values ('data4', 'text4', 'string4', 'date4');
col CO11 format a8
col col2 format a8
col col3 format a8
col col4 format a8
select * from a8_format;
Execute via F5
Also make sure you're using a fixed width font for the Code Editor
add a comment |
1.Increase the column width in format command
Or
2. Use LPAD with expr2 as 12 (Or more depending upon the format spaces)
SQLcl should format in columnar format. LPAd is just forcing it unnesscessarily
– Barry McGillin
Nov 16 '18 at 12:17
Yes, but just that it could be used as an option.
– Namandeep_Kaur
Nov 17 '18 at 0:12
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53327085%2fsqlcl-select-statement-resultant-formatting-of-the-data-doesnt-abide-by-the-h%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Maybe upgrade?
Latest version (18.3)
drop table a8_format;
clear screen
create table a8_format (co11 varchar2(20), col2 varchar2(20), col3 varchar2(20), col4 varchar2(20));
insert into a8_format values ('data1', 'text1', 'string1', 'date1');
insert into a8_format values ('data2', 'text2', 'string2', 'date2');
insert into a8_format values ('data3', 'text3', 'string3', 'date3');
insert into a8_format values ('data4', 'text4', 'string4', 'date4');
col CO11 format a8
col col2 format a8
col col3 format a8
col col4 format a8
select * from a8_format;
Execute via F5
Also make sure you're using a fixed width font for the Code Editor
add a comment |
Maybe upgrade?
Latest version (18.3)
drop table a8_format;
clear screen
create table a8_format (co11 varchar2(20), col2 varchar2(20), col3 varchar2(20), col4 varchar2(20));
insert into a8_format values ('data1', 'text1', 'string1', 'date1');
insert into a8_format values ('data2', 'text2', 'string2', 'date2');
insert into a8_format values ('data3', 'text3', 'string3', 'date3');
insert into a8_format values ('data4', 'text4', 'string4', 'date4');
col CO11 format a8
col col2 format a8
col col3 format a8
col col4 format a8
select * from a8_format;
Execute via F5
Also make sure you're using a fixed width font for the Code Editor
add a comment |
Maybe upgrade?
Latest version (18.3)
drop table a8_format;
clear screen
create table a8_format (co11 varchar2(20), col2 varchar2(20), col3 varchar2(20), col4 varchar2(20));
insert into a8_format values ('data1', 'text1', 'string1', 'date1');
insert into a8_format values ('data2', 'text2', 'string2', 'date2');
insert into a8_format values ('data3', 'text3', 'string3', 'date3');
insert into a8_format values ('data4', 'text4', 'string4', 'date4');
col CO11 format a8
col col2 format a8
col col3 format a8
col col4 format a8
select * from a8_format;
Execute via F5
Also make sure you're using a fixed width font for the Code Editor
Maybe upgrade?
Latest version (18.3)
drop table a8_format;
clear screen
create table a8_format (co11 varchar2(20), col2 varchar2(20), col3 varchar2(20), col4 varchar2(20));
insert into a8_format values ('data1', 'text1', 'string1', 'date1');
insert into a8_format values ('data2', 'text2', 'string2', 'date2');
insert into a8_format values ('data3', 'text3', 'string3', 'date3');
insert into a8_format values ('data4', 'text4', 'string4', 'date4');
col CO11 format a8
col col2 format a8
col col3 format a8
col col4 format a8
select * from a8_format;
Execute via F5
Also make sure you're using a fixed width font for the Code Editor
answered Nov 15 '18 at 21:28
thatjeffsmiththatjeffsmith
8,00211445
8,00211445
add a comment |
add a comment |
1.Increase the column width in format command
Or
2. Use LPAD with expr2 as 12 (Or more depending upon the format spaces)
SQLcl should format in columnar format. LPAd is just forcing it unnesscessarily
– Barry McGillin
Nov 16 '18 at 12:17
Yes, but just that it could be used as an option.
– Namandeep_Kaur
Nov 17 '18 at 0:12
add a comment |
1.Increase the column width in format command
Or
2. Use LPAD with expr2 as 12 (Or more depending upon the format spaces)
SQLcl should format in columnar format. LPAd is just forcing it unnesscessarily
– Barry McGillin
Nov 16 '18 at 12:17
Yes, but just that it could be used as an option.
– Namandeep_Kaur
Nov 17 '18 at 0:12
add a comment |
1.Increase the column width in format command
Or
2. Use LPAD with expr2 as 12 (Or more depending upon the format spaces)
1.Increase the column width in format command
Or
2. Use LPAD with expr2 as 12 (Or more depending upon the format spaces)
answered Nov 15 '18 at 20:21
Namandeep_KaurNamandeep_Kaur
12017
12017
SQLcl should format in columnar format. LPAd is just forcing it unnesscessarily
– Barry McGillin
Nov 16 '18 at 12:17
Yes, but just that it could be used as an option.
– Namandeep_Kaur
Nov 17 '18 at 0:12
add a comment |
SQLcl should format in columnar format. LPAd is just forcing it unnesscessarily
– Barry McGillin
Nov 16 '18 at 12:17
Yes, but just that it could be used as an option.
– Namandeep_Kaur
Nov 17 '18 at 0:12
SQLcl should format in columnar format. LPAd is just forcing it unnesscessarily
– Barry McGillin
Nov 16 '18 at 12:17
SQLcl should format in columnar format. LPAd is just forcing it unnesscessarily
– Barry McGillin
Nov 16 '18 at 12:17
Yes, but just that it could be used as an option.
– Namandeep_Kaur
Nov 17 '18 at 0:12
Yes, but just that it could be used as an option.
– Namandeep_Kaur
Nov 17 '18 at 0:12
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53327085%2fsqlcl-select-statement-resultant-formatting-of-the-data-doesnt-abide-by-the-h%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
why format? try > set sqlformat ansiconsole
– Kris Rice
Nov 16 '18 at 2:47
Are you using a fixed format font?
– Barry McGillin
Nov 16 '18 at 12:19