Prompt Command With Ending ''-'' (Dashes) Treated As Continuation Character (Doc ID 461068.1)

Last updated on OCTOBER 10, 2007

Applies to:

SQL*Plus - Version: 8.1.7.4.0 to 10.2.0.3.0
This problem can occur on any platform.

Symptoms

In SQL*Plus, the PROMPT command is not handled in the manner one would normally expect if the last character on the line is a dash/hyphen (-).  It treats the dash/hyphen (-) as a continuation character when that is not the intent.

Example 1:
For example, from a SQL script the below:

prompt Some Text
prompt ---------
prompt

produces the following output:

Some Text
-------- prompt

The output intended is:

Some Text
---------
<blank line>

Example 2:

From the command prompt, the following is seen:

SQL> prompt abc
abc
SQL> prompt ---
>

Instead of:

SQL> prompt abc
abc
SQL> prompt ---
---

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms