Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle CHAR bind parameter

 
Bikram Rathod
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could you paste your code and query to put better clarity on your problem

Shailesh
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try TRIM() on both sides of the '=' comparison.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic