Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ORA-00911: invalid character when executing INSERT statement with ; in TOAD

187 views
Skip to first unread message

jrefa...@hotmail.com

unread,
Aug 12, 2005, 1:43:10 PM8/12/05
to
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

unread,
Aug 12, 2005, 2:00:28 PM8/12/05
to

jrefa...@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

unread,
Aug 12, 2005, 5:14:23 PM8/12/05
to
jrefa...@hotmail.com wrote:
: In TOAD, when I execute the following INSERT statements

: 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

unread,
Aug 13, 2005, 11:18:03 PM8/13/05
to

<jrefa...@hotmail.com> wrote in message
news:1123868590.2...@g49g2000cwa.googlegroups.com...

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


0 new messages