× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



        Hi Paul,

        But using the "like" keyword such as String sqlstmt = "select
firm, office, acct from Table where Ref  like "  +
         "'" +wrkref.trim() + "%'" ;

        does not return the row either.

        Any idea why NOT??

Rajesh Anand
Email:Rajesh_anand@xxxxxx


-----Original Message-----
From: java400-l-bounces@xxxxxxxxxxxx
[mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Paul Nicolay
Sent: 16 May 2006 15:15
To: Java Programming on and around the iSeries / AS400
Subject: Re: Selection a row using jdbc where a column contains embedded
blanks on iSeries.


Hi,

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,
Paul


----- 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.

All,

        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
Email:Rajesh_anand@xxxxxx
--------------------------------------------------------

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/
--------------------------------------------------------

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.