semi-colon weirdness when converting from mysql to Oracle
- From: "Daisy" <jeffrdrew@xxxxxxxxx>
- Date: 14 Dec 2006 10:31:58 -0800
I've used mysql extensively, but now I'm converting to Oracle. My
inserts are working, but my queries are sensitive to the semi-colon
line termination. Is there a way to correct this without rewriting all
my queries?
For example, the following works for JDBC with mysql and Oracle's SQL
Command line tool. But using JDBC with Oracle throws an error:
ORA-00911: invalid character
SELECT distinct (clientName) FROM tm.ClientSessionInfo;
However, removing the semi-colon allows the query to work from JDBC
with Oracle:
SELECT distinct (clientName) FROM tm.ClientSessionInfo
I'm using oracle.jdbc.driver.OracleDriver 1.4 and Oracle 10.
The code is:
String query ="SELECT distinct (clientName) FROM tm.ClientSessionInfo;"
statement = connection.prepareStatement( query );
results = statement.executeQuery( );
Do I have to rewrite all my queries without semi-colons or is there
some other solution?
Thanks
.
- Follow-Ups:
- Re: semi-colon weirdness when converting from mysql to Oracle
- From: Chris Riesbeck
- Re: semi-colon weirdness when converting from mysql to Oracle
- Prev by Date: Re: Problem with jdbc, RowSet and Oracle
- Next by Date: Re: semi-colon weirdness when converting from mysql to Oracle
- Previous by thread: Batch insertions getting slow over time
- Next by thread: Re: semi-colon weirdness when converting from mysql to Oracle
- Index(es):
Relevant Pages
|