The problem is not the embedded blanks... but the trailing blanks !

If your iSeries table is not defined with varying columns, an exact WHERE will 
always fail since the database always has trailing blanks in its columns.

Kind regards,

----- Oorspronkelijk bericht -----
Van: Anand, Rajesh [mailto:Rajesh_Anand@xxxxxx]
Verzonden: dinsdag, mei 16, 2006 02:26 PM
Aan: java400-l@xxxxxxxxxxxx
Onderwerp: Selection a row using jdbc where a column contains embedded blanks 
on        iSeries.


        I've encountered a problem and hoping someone in the list have
come across this.

        I've a database file on iSeries and one of the column has data
like "abc__d00" where "_" represents a blank.

        This column has 2 blanks and when using jdbc sql statement like
below..the resultset does not returns this row.

        String sqlstmt = "select        firm, office, acct from Table
where Ref  = "  + "'" +wrkref.trim() + "'" ;

        wrkref (String ) varaible contains the value = abc__d00.

        WHY doesn't the jdbc returns this row. I know it exists but
wondering if its to do with wrkref defined as String type and nulls in
the string type do not convert to
        characters in jdbc. 

        Any help will be greatly appreciated.


Rajesh Anand

If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail.     http://www.ml.com/email_terms/

This thread ...

Return to Archive home page | Return to MIDRANGE.COM home page