Forum Stats

  • 3,854,528 Users
  • 2,264,379 Discussions
  • 7,905,718 Comments

Discussions

BREAK ON breaks ansiconsole format

user9540031
user9540031 Member Posts: 230 Gold Badge

Tested on: SQL Developer 21.4.2, SQLcl 21.4.1

SQL> show sqlformat
SQL Format : ansiconsole

SQL> select * from dual;

   DUMMY
________
X

SQL> break on nosuchcolumn nodup

SQL> break
break on nosuchcolumn nodup

SQL> select * from dual;

D
-
X

SQL> show sqlformat
SQL Format : ansiconsole

SQL> clear breaks
breaks cleared

SQL> select * from dual;

   DUMMY
________
X

Bottom line: though sqlformat is set to ansiconsole, whenever a break on any column is set using the BREAK command, SQLcl / SQL Developer silently reverts to the default (SQL*Plus) formatting style.

Why? Perhaps because column breaks were meant to be used in formatted SQL*Plus reports in the first place, in conjunction with partial totals using the COMPUTE command, multi-line column headings, etc., and integrating these features into the ansiconsole format might turn out to be more complex than worth.

So, if you're lazy and you create quick-and-dirty reports in ansiconsole format—because you won't bother setting column widths using the COLUMN command, or you're in a hurry—and suddenly all your reports revert to the default SQL*Plus format—and may not look good as a result, as you didn't take care of formatting them in the first place—it could just be that at some point you have left a BREAK on some column, which must be cleared (CLEAR BREAKS) before ansiconsole may apply again.

Just thought I'd mention it.

Regards,

Comments