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 ansiconsole column alignment

user4668973Mar 15 2018 — edited Mar 27 2018

I try to use coloring in sqlcl using sqlformat "ansiconsole". If something is highlighted with a color tag the column become out of alignment.

In below example the first select does no highlighting and column headers and values are in line. In second select objects owned by "SYS" are highlighted, but the header and values are not in alignment.

Does anyone has an idea to get this formatted well?

set sqlformat ansiconsole

SELECT

   OWNER,

   OBJECT_NAME

FROM

   ALL_OBJECTS

WHERE

   OBJECT_NAME='ALL_OBJECTS';

SELECT

   DECODE(OWNER,'SYS','@|BG_RED '||OWNER||'|@',OWNER) OWNER,

   OBJECT_NAME

FROM

   ALL_OBJECTS

WHERE

   OBJECT_NAME='ALL_OBJECTS';

Comments

Post Details

Added on Mar 15 2018
4 comments
648 views