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



So it was a combination of issues.....

SearchCriteria needed to be varying. Then I trimmed it for extra care.
But I had embedded the beginning and ending quotes.... they are not
needed, sql takes care of that for you. Once I got rid of them it worked.


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



Charles Wilt <charles.wilt@xxxxxxxxx>
Sent by: wdsci-l-bounces@xxxxxxxxxxxx
10/06/2010 10:53 AM
Please respond to
Rational Developer for IBM i / Websphere Development Studio Client for
System i & iSeries <wdsci-l@xxxxxxxxxxxx>


To
"Rational Developer for IBM i / Websphere Development Studio Client for
System i & iSeries" <wdsci-l@xxxxxxxxxxxx>
cc

Subject
Re: [WDSCI-L] View SQL Statment while debugging in WDSC






No...not with a static statment

But you could see it in iNav via the SQL Plan Cache, or an SQL
Performance monitor.

However, I'd be willing to bet that the problem is that
:SearchCriteria is fixed length.

Thus you're asking...
select value from BMDATA/rcm#name where key like '%HOSPITAL% '

Note the trailing spaces....

Either change :SerachCriteria to VARYING

or make the value:
'%HOSPITAL%%%%%%%%%%'

HTH,
Charles

On Wed, Oct 6, 2010 at 10:14 AM, Bryce Martin <BMartin@xxxxxxxxxxxx>
wrote:
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. ---
--
This is the Rational Developer for IBM i / Websphere Development Studio
Client for System i & iSeries (WDSCI-L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.


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.