Skip to Main Content

SQL & PL/SQL

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-00942 Error (table or view does not exist)

460498Oct 16 2005 — edited Oct 17 2005
Hi,

I'm receiving error ORA-00942 (table or view does not exist) whenever I try to execute a particular select statement. Firstly, a couple of points:

1. I'm connecting to the correct schema
2. All of the tables involved in the query do exist in the schema to which I'm connecting (I double checked by doing a select from user_tables in the same connection)

The query is quite long and involves joining on approximately 400 tables so it's not possible to execute it in sqlplus. As a result, I've written a simple java program to execute it via JDBC. This causes the error below.

The SQL is too big to fit in the post so I've posted it here:

http://www.mobiustech.ie/oracle_query.sql

Has anyone come accross this error in this kind of context? Any pointers on where to even start with debugging this?

Thanks,
-phil



The Exception
-----------------
Connecting with URL: jdbc:oracle:thin:@localhost:1521:orcl...done. Elapsed Time: 2537
Preparing the statement...16-Oct-2005 18:47:30 oracle.jdbc.driver.PhysicalConnection getDefaultFixedString
INFO: PhysicalConnection.getDefaultFixedString() returning false
16-Oct-2005 18:47:30 oracle.jdbc.driver.OraclePreparedStatement setString
INFO: OraclePreparedStatement.setString(paramIndex=1, x=4028808706e106e70106e10738830001)
done. Elapsed Time: 620
Executing test statement...ORA-00942: table or view does not exist

java.sql.SQLException: ORA-00942: table or view does not exist

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:911)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1122)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:962)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1242)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3415)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3459)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2005
Added on Oct 16 2005
5 comments
2,952 views