Home > Archive > Other Oracle database topics > August 2005 > ORA-00911: invalid character when executing INSERT statement with ; in TOAD









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ORA-00911: invalid character when executing INSERT statement with ; in TOAD
jrefactors@hotmail.com

2005-08-12, 1:23 pm

In TOAD, when I execute the following INSERT statements
with semi-colon in the end, I will get error
"ORA-00911: invalid character"

INSERT INTO T1 (A, B) VALUES ('Joe','1001');
INSERT INTO T1 (A, B) VALUES ('May','2001');
INSERT INTO T1 (A, B) VALUES ('Cat','3001');

If I execute in Oracle SQL*PLUS, it is fine with semi-colon.

But If I eliminate all semi colon, then I will get
error "ORA-00933: SQL command not properly ended."

INSERT INTO T1 (A, B) VALUES ('Joe','1001')
INSERT INTO T1 (A, B) VALUES ('May','2001')
INSERT INTO T1 (A, B) VALUES ('Cat','3001')

In TOAD, it only has problem for INSERT statement with semi-colon.
When I execute SELECT statement, it is fine.

Any ideas?

Paul

2005-08-12, 1:23 pm


jrefactors@hotmail.com wrote:

> In TOAD, when I execute the following INSERT statements
> with semi-colon in the end, I will get error
> "ORA-00911: invalid character"
>
> INSERT INTO T1 (A, B) VALUES ('Joe','1001');
> INSERT INTO T1 (A, B) VALUES ('May','2001');
> INSERT INTO T1 (A, B) VALUES ('Cat','3001');
>
> If I execute in Oracle SQL*PLUS, it is fine with semi-colon.



> Any ideas?



Try executing as a batch?



Paul...


--

plinehan __at__ yahoo __dot__ __com__

XP Pro, SP 2,

Oracle, 9.2.0.1.0 (Enterprise Ed.)
Interbase 6.0.1.0;

When asking database related questions, please give other posters
some clues, like operating system, version of db being used and DDL.
The exact text and/or number of error messages is useful (!= "it didn't work!").
Thanks.

Furthermore, as a courtesy to those who spend
time analysing and attempting to help, please
do not top post.
Malcolm Dew-Jones

2005-08-12, 8:23 pm

jrefactors@hotmail.com wrote:
: In TOAD, when I execute the following INSERT statements
: with semi-colon in the end, I will get error
: "ORA-00911: invalid character"

: INSERT INTO T1 (A, B) VALUES ('Joe','1001');
: INSERT INTO T1 (A, B) VALUES ('May','2001');
: INSERT INTO T1 (A, B) VALUES ('Cat','3001');

: If I execute in Oracle SQL*PLUS, it is fine with semi-colon.

: But If I eliminate all semi colon, then I will get
: error "ORA-00933: SQL command not properly ended."

: INSERT INTO T1 (A, B) VALUES ('Joe','1001')
: INSERT INTO T1 (A, B) VALUES ('May','2001')
: INSERT INTO T1 (A, B) VALUES ('Cat','3001')

: In TOAD, it only has problem for INSERT statement with semi-colon.
: When I execute SELECT statement, it is fine.

: Any ideas?

It appears toad is submitting your code as a single statement. So either
provide a single statement, or use some other options or entry point
within toad that allows you to submit multiple statements.





--

This space not for rent.
James Kelly

2005-08-14, 3:23 am


<jrefactors@hotmail.com> wrote in message
news:1123868590.202441.109280@g49g2000cwa.googlegroups.com...
> In TOAD, when I execute the following INSERT statements
> with semi-colon in the end, I will get error
> "ORA-00911: invalid character"
>
> INSERT INTO T1 (A, B) VALUES ('Joe','1001');
> INSERT INTO T1 (A, B) VALUES ('May','2001');
> INSERT INTO T1 (A, B) VALUES ('Cat','3001');
>
> If I execute in Oracle SQL*PLUS, it is fine with semi-colon.
>
> But If I eliminate all semi colon, then I will get
> error "ORA-00933: SQL command not properly ended."
>
> INSERT INTO T1 (A, B) VALUES ('Joe','1001')
> INSERT INTO T1 (A, B) VALUES ('May','2001')
> INSERT INTO T1 (A, B) VALUES ('Cat','3001')
>
> In TOAD, it only has problem for INSERT statement with semi-colon.
> When I execute SELECT statement, it is fine.
>
> Any ideas?
>


I have found that in 7, you have to highlight all the statements you want to
execute and then "Run as Script" rather than just execute.

James


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com