Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00911: invalid character using multiple select statements

716308Aug 7 2009 — edited Dec 13 2011
I am getting an ORA-00911: invalid character error when trying to execute 2 select statements using ODP.NET.

cmd.CommandText = "select sysdate from dual;select sysdate from dual;";
cmd.Connection = conn;
cmd.CommandType = System.Data.CommandType.Text;
conn.Open();
OracleDataReader dr = cmd.ExecuteReader();

This works in SQL server but for some reason it appears this does not work in Oracle?

If this is the case what is a vaiable workaround? Wrapping the 2 statements in a transaction?

Seems strange that you can't return multiple result sets using in-line sql statements.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2011
Added on Aug 7 2009
3 comments
3,921 views