SQL Language (MOSC)

MOSC Banner

SQLcl "ansiconsole" and spooling to file

edited Feb 5, 2020 4:27AM in SQL Language (MOSC) 1 commentAnswered ✓

Hi all ,

I like to user SQLCL with the option "set sqlformat ansiconsole" since the results are nicely formatted. But when spooling the results of a query into a file the heading of the columns are some kind of messed up:

===================================================================

information about components loaded into the database:

===================================================================

^[[4;1mCOMP_ID  ^[[m^[[4;1mVERSION     ^[[m^[[4;1mSTATUS  ^[[m

CATALOG  12.2.0.1.0  VALID

CATJAVA  12.2.0.1.0  VALID

CATPROC  12.2.0.1.0  VALID

JAVAVM   12.2.0.1.0  VALID

OWM      12.2.0.1.0  VALID

XDB      12.2.0.1.0  VALID

XML      12.2.0.1.0  VALID

The rows of a table are nicely formatted in the spooled file - but the heading doesn't look nice at all. I know that using SQLPLUS instead of SQLcl offers many options to format the resultset of a query which will get spooled into a file. But that is not my question at all.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center