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!

Bug: an alias with SQLPLUS content is parsed incorrectly if it contains COLUMN ... WRAPPED

user9540031Aug 24 2025

Tested on SQLcl 25.2.2

Given the following alias definition:

 Line# |Text
-------+---------------------------
     1 |alias testalias=q'
     2 |column c1 format a20 wrapped
     3 |begin
     4 |    null;
     5 |end;
     6 |/
     7 |column c1 clear
     8 |'
     9 |/

(This should define an alias named testalias, with content of type SQLPLUS as specified by the q' opening marker; the content should go all the way down to the character preceding the ' closing marker on line 8, which terminates the content as it is followed by the single / on line 9.)

Apparently, the wrapped keyword in the column specification on line 2 causes SQLcl to incorrectly parse the alias definition, misinterpreting the / on line 6 as terminating the content, whereas that character is intended to be included in the content. As a result, the alias definition is not syntactically valid, and is rejected.

If the wrapped keyword is removed, the alias definition is parsed as expected.

(Please don't tell me that wrapped is the default; it usually is… that is, unless SET WRAP is OFF.)

Regards,

Comments
Post Details
Added on Aug 24 2025
0 comments
34 views