dbTalk Databases Forums  

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

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss SQLPLUS fails when there is an extra line in the sql ? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #21  
Old   
Urs Metzger
 
Posts: n/a

Default Re: SQLPLUS fails when there is an extra line in the sql ? - 02-15-2008 , 02:17 PM






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

I am using sqlplus ( Release 10.1.0.5.0 - 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@mydatabase @deploy.sql
",

And here is the piece of the sql that gives me the headache.
"
CREATE TABLE "DM_ENUM"
( "CLASS_NAME" VARCHAR2(60 BYTE),
"MEMBER_NAME" VARCHAR2(60 BYTE),
"MEMBER_ORDER" NUMBER

);
",
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 ?



John
John,

please try

set sqlblanklines on

hth

Urs Metzger


Reply With Quote
  #22  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: SQLPLUS fails when there is an extra line in the sql ? - 02-15-2008 , 02:54 PM






On Feb 15, 2:17*pm, Urs Metzger <u... (AT) ursmetzger (DOT) de> wrote:
Quote:
John schrieb:



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

I am using sqlplus ( Release 10.1.0.5.0 - 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@mydatabase @deploy.sql
",

And here is the piece of the sql that gives me the headache.
"
CREATE TABLE "DM_ENUM"
* *( * *"CLASS_NAME" VARCHAR2(60 BYTE),
* * * * "MEMBER_NAME" VARCHAR2(60 BYTE),
* * * * "MEMBER_ORDER" NUMBER

* *);
",
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 ?

John

John,

please try

* * set sqlblanklines on

hth

Urs Metzger- Hide quoted text -

- Show quoted text -
Such a resourceful person. And I've learned something else new today.

Thank you.


David Fitzjarrell


Reply With Quote
  #23  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: SQLPLUS fails when there is an extra line in the sql ? - 02-15-2008 , 02:54 PM



On Feb 15, 2:17*pm, Urs Metzger <u... (AT) ursmetzger (DOT) de> wrote:
Quote:
John schrieb:



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

I am using sqlplus ( Release 10.1.0.5.0 - 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@mydatabase @deploy.sql
",

And here is the piece of the sql that gives me the headache.
"
CREATE TABLE "DM_ENUM"
* *( * *"CLASS_NAME" VARCHAR2(60 BYTE),
* * * * "MEMBER_NAME" VARCHAR2(60 BYTE),
* * * * "MEMBER_ORDER" NUMBER

* *);
",
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 ?

John

John,

please try

* * set sqlblanklines on

hth

Urs Metzger- Hide quoted text -

- Show quoted text -
Such a resourceful person. And I've learned something else new today.

Thank you.


David Fitzjarrell


Reply With Quote
  #24  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: SQLPLUS fails when there is an extra line in the sql ? - 02-15-2008 , 02:54 PM



On Feb 15, 2:17*pm, Urs Metzger <u... (AT) ursmetzger (DOT) de> wrote:
Quote:
John schrieb:



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

I am using sqlplus ( Release 10.1.0.5.0 - 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@mydatabase @deploy.sql
",

And here is the piece of the sql that gives me the headache.
"
CREATE TABLE "DM_ENUM"
* *( * *"CLASS_NAME" VARCHAR2(60 BYTE),
* * * * "MEMBER_NAME" VARCHAR2(60 BYTE),
* * * * "MEMBER_ORDER" NUMBER

* *);
",
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 ?

John

John,

please try

* * set sqlblanklines on

hth

Urs Metzger- Hide quoted text -

- Show quoted text -
Such a resourceful person. And I've learned something else new today.

Thank you.


David Fitzjarrell


Reply With Quote
  #25  
Old   
fitzjarrell@cox.net
 
Posts: n/a

Default Re: SQLPLUS fails when there is an extra line in the sql ? - 02-15-2008 , 02:54 PM



On Feb 15, 2:17*pm, Urs Metzger <u... (AT) ursmetzger (DOT) de> wrote:
Quote:
John schrieb:



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

I am using sqlplus ( Release 10.1.0.5.0 - 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@mydatabase @deploy.sql
",

And here is the piece of the sql that gives me the headache.
"
CREATE TABLE "DM_ENUM"
* *( * *"CLASS_NAME" VARCHAR2(60 BYTE),
* * * * "MEMBER_NAME" VARCHAR2(60 BYTE),
* * * * "MEMBER_ORDER" NUMBER

* *);
",
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 ?

John

John,

please try

* * set sqlblanklines on

hth

Urs Metzger- Hide quoted text -

- Show quoted text -
Such a resourceful person. And I've learned something else new today.

Thank you.


David Fitzjarrell


Reply With Quote
  #26  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: SQLPLUS fails when there is an extra line in the sql ? - 02-15-2008 , 04:10 PM



John (chunji08 (AT) gmail (DOT) com) 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 10.1.0.5.0 - 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@mydatabase @deploy.sql
: ",

: And here is the piece of the sql that gives me the headache.
: "
: CREATE TABLE "DM_ENUM"
: ( "CLASS_NAME" VARCHAR2(60 BYTE),
: "MEMBER_NAME" VARCHAR2(60 BYTE),
: "MEMBER_ORDER" NUMBER

: );
: ",
: 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.

E.g.

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

DUMMY
--------------------
X

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


Reply With Quote
  #27  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: SQLPLUS fails when there is an extra line in the sql ? - 02-15-2008 , 04:10 PM



John (chunji08 (AT) gmail (DOT) com) 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 10.1.0.5.0 - 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@mydatabase @deploy.sql
: ",

: And here is the piece of the sql that gives me the headache.
: "
: CREATE TABLE "DM_ENUM"
: ( "CLASS_NAME" VARCHAR2(60 BYTE),
: "MEMBER_NAME" VARCHAR2(60 BYTE),
: "MEMBER_ORDER" NUMBER

: );
: ",
: 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.

E.g.

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

DUMMY
--------------------
X

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


Reply With Quote
  #28  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: SQLPLUS fails when there is an extra line in the sql ? - 02-15-2008 , 04:10 PM



John (chunji08 (AT) gmail (DOT) com) 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 10.1.0.5.0 - 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@mydatabase @deploy.sql
: ",

: And here is the piece of the sql that gives me the headache.
: "
: CREATE TABLE "DM_ENUM"
: ( "CLASS_NAME" VARCHAR2(60 BYTE),
: "MEMBER_NAME" VARCHAR2(60 BYTE),
: "MEMBER_ORDER" NUMBER

: );
: ",
: 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.

E.g.

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

DUMMY
--------------------
X

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


Reply With Quote
  #29  
Old   
Malcolm Dew-Jones
 
Posts: n/a

Default Re: SQLPLUS fails when there is an extra line in the sql ? - 02-15-2008 , 04:10 PM



John (chunji08 (AT) gmail (DOT) com) 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 10.1.0.5.0 - 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@mydatabase @deploy.sql
: ",

: And here is the piece of the sql that gives me the headache.
: "
: CREATE TABLE "DM_ENUM"
: ( "CLASS_NAME" VARCHAR2(60 BYTE),
: "MEMBER_NAME" VARCHAR2(60 BYTE),
: "MEMBER_ORDER" NUMBER

: );
: ",
: 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.

E.g.

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

DUMMY
--------------------
X

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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.