ORA-00911: invalid character

kzapi

Member
Using the sql window I am trying to run multiple commands at once when I get the error message "ORA-00911: invalid character".

I have tried changing the AutoSelect Statement option in SQLWindow options, but with no effect.

Any help would be greatly appreciated!
 
Yes, here is a sample!

insert into VALADM.TMP_RELS (NETWORK_OID, PARENT_OID) values (19, 1);
insert into VALADM.TMP_RELS (NETWORK_OID, PARENT_OID) values (20, 1);

thx / Kevin
 
You can use PL/SQL Developer's Command Window to run a script with multiple SQL statements at once (see also chapter 7 in the user's guide).

The SQL Window is an interactive tool. You can execute just one single SQL statement or PL/SQL Block at a time, view or edit result set in case of select statements, drill down to foreign key related tables, cursor fields and collections, switch between single-record/multi-record display, view resource statistics and query plans, export data, and so on. It cannot execute multiple statements separated by semi-colons. However, if you go to Tools > Preferences > SQL Window tab page, you can enable the "AutoSelect Statement" preference. Now the SQL Window will recognize that you have multiple statements in the editor, and will execute (and select) just the one under the cursor.

The Command Window is a batch-script and command-line oriented tool, which can execute multiple statements simultaneously and offers a certain level of SQL*Plus compatibility.
 
I think he is hitting the following.

If you have 2 statements in SQL window, and you are on the LAST 3TH line and hit F8 you get that error.

example:
------------------------------------
select * from dual;
select * from dual;

------------------------------------

Press F8 the first query is selected, and you get invalid charater. (I guess it's taking the ';' as part of the query)

If your cursor is flashing just after the ';' on the 2nd line, the second query is run without errors.
 
I have a SQL statement that is 146 lines long including the last line which is just the semicolon. I have autoselect on. If I run it I get this error message. If I select everything but the semicolon, it runs. I have version 5.1.6.747.
 
Back
Top