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



Bryce,
When using embedded SQL and the LIKE keyword, you must either fill the field
with the % character from the last byte used, or use the TRIM keyword in
your select.
ie. if key is a 10 byte field, you would have to build the value to be searched
on as %HOSPITAL%%%  or in your SQL where TRIM(key) like ....



 
Jeff Young
Sr. Programmer Analyst
IBM -e(logo) server Certified Systems Exper - iSeries Technical Solutions V5R2 
IBM  Certified Specialist- e(logo) server i5Series Technical Solutions
Designer V5R3
IBM  Certified Specialist- e(logo)server i5Series Technical
Solutions Implementer V5R3

  
 






________________________________
From: Bryce Martin <BMartin@xxxxxxxxxxxx>
To: Rational Developer for IBM i / Websphere Development Studio Client for
System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Sent: Wed, October 6, 2010 10:14:56 AM
Subject: [WDSCI-L] View SQL Statment while debugging in WDSC

I have an sql statement that when I run it from outside my program using
an sql utility like FROG I get the search results I expect.  But when I
run the statement in my RPGLE program it returns with an sql 100 code
which means no results returned.

here is the sql statement...
select value from BMDATA/rcm#name where key like '%HOSPITAL%'

Here is the statement from in my program...
        Exec SQL
          Declare C1 Cursor for
          Select value from bmdata/rcm#name where key like
                                                  :SearchCriteria;

The value of SearchCriteria is  '%HOSPITAL%'

These look exactly the same to me....I was wondering if there is a way to
view the actual sql statement using monitor when debugging in WDSC using a
SEP?



Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777
--- This message (including any attachments) is intended only for the use of the
individual or entity to which it is addressed and may contain information that
is non-public, proprietary, privileged, confidential, and exempt from disclosure
under applicable law. If you are not the intended recipient, you are hereby
notified that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this communication in
error, please notify us and destroy this message immediately. ---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.