Hi,

My table has a char(5) field that is not always full.  "CA   " is a value in
the table.  When I search against the table using an OQLQuery like:

OQLQuery query = db.getOQLQuery(
        "SELECT c FROM CodeValue c " +
        "WHERE value = $1" );
query.bind( "CA   " );  // With 3 blanks

I get the expected result, but when I search without using the blanks:

query.bind( "CA" );  // Without 3 blanks

I don't get a match on the row in the database.  This is a problem since the
user is typing the "CA" and won't know that it needs 3 blanks.  I don't want
to add the blanks myself because I have many queries like this and want to
handle them in a generic fashion.

I am using Oracle 8.0.5.  

Any help would be greatly appreciated.

Thanks,
Wayde Stallmann
314/235-3059

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to