Home » Developer & Programmer » JDeveloper, Java & XML » PreparedStatement In Table Partition - Select * From Table Partition (?)
icon4.gif  PreparedStatement In Table Partition - Select * From Table Partition (?) [message #197501] Wed, 11 October 2006 08:50
felipevinturini
Messages: 10
Registered: August 2005
Location: Brazil
Junior Member
Hi All,

I am trying to use the question mark in the PrepartedStatement for the name of a table partition, like the following:
===============================================================
prepStmt = dbConnection.prepareStatement("Select Ano From Ia_Trans_Upd Partition ( ? ) Where Ano = ? ");
prepStmt.setString(1, "P_IATRNSU_20060731");
prepStmt.setString(2, "5381249150");
===============================================================

But I am facing the following error:
===============================================================
java.sql.SQLException: ORA-00933: SQL command not properly ended
===============================================================

When I put in the query the table partition name, instead of using the question mark, it works ok.

Is it possible to do this(so Am I doing something wrong?) or I can use the question mark only in the Where clause?

Thanks for your assistance.

[Updated on: Wed, 11 October 2006 08:51]

Report message to a moderator

Previous Topic: Java Stored Procedures take longer to execute
Next Topic: XSL Transformation in Oracle 9i
Goto Forum:
  


Current Time: Mon Nov 25 09:04:49 CST 2024