Re: SQLPLUS fails when there is an extra line in the sql ?

From: Malcolm Dew-Jones <>
Date: 15 Feb 2008 14:10:20 -0800
Message-ID: <47b60dcc$>

John ( wrote:

: This may have been reported by someone, but I just want to share it
: with you, just in case.

: I am using sqlplus ( Release - Production), on my linux
: box. Usually I am using this command to access a databae to execute a
: "deploy.sql" that invokes another hundreds sql files, such as:
: "
: sqlplus username/password_at_mydatabase @deploy.sql
: ",

: And here is the piece of the sql that gives me the headache.
: "

: );
: ",
: as you can see there is an extra blank line before the right
: parenthesis, and because of that, I see such errors in my log file,
: "
: SP2-0042: unknown command ") " - rest of line ignored.
: ".

: But If I manually remove that blank line, everything works fine.

: I wonder if there is a patch, or higher version of sqlplus that have
: such problem solved ?

As pointed out elsewhere, you can change this sqlplus behaviour (starting what version, no idea), and it is not a bug but the way sqlplus works.

The point of my message is to point out that when using sqlplus interactively this is indeed a useful feature. You get to interact with sqlplus in the middle of typing sql.


	SQL> select * from
	SQL> define y=3
	SQL> col dummy format a20
	SQL> i
	  2  dual where 3=&y.
	SQL> /
	old   2: dual where 3=&y.
	new   2: dual where 3=3

	1 row selected.

That example is pointless, but in real work the ability to interact with sqlplus independently of the running of SQL statements is very convenient, and is not a "bug" to be fixed.

$0.10 Received on Fri Feb 15 2008 - 16:10:20 CST

Original text of this message