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



        It works fine on iSeries SQL interactive session but doesn't
work from Java app.

        And I get...

        SELECT firm,office, acct FROM Table WHERE ref = '6E12  BYD30'.

        Incidentally, the database file has field ref as 10 char long
and not varchar.

        I can't change the db table because of much wider implications.

        rgds,

Rajesh Anand
Email:Rajesh_anand@xxxxxx


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


Anand,

If you do a System.out.println( sqlstmt ) in your app, cut and paste 
that in  the SQL  command line, what do you get ?

Pillai

Anand, Rajesh wrote:

>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-Ups:

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.