aspose file tools
The moose likes JDBC and Relational Databases and the fly likes Oracle CHAR bind parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Oracle CHAR bind parameter" Watch "Oracle CHAR bind parameter" New topic

Oracle CHAR bind parameter

Bikram Rathod

Joined: Jul 26, 2005
Posts: 1
We are using Prepared Statement to access oracle 9i database from a Java application. For a CHAR datatype in Oracle we are using the String datatype as binding parameter. It works fine when the search criteria is Partial Search(using 'LIKE' clause). It fails when the search criteria is supposed to be equal match (=). By fail I mean 0 Records are returned . But when the query is run standalone on SQLPLUS it returns records. Has anybody encountered any such situation.
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

could you paste your code and query to put better clarity on your problem


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

try TRIM() on both sides of the '=' comparison.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Oracle CHAR bind parameter