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



Is lloc 5 characters long and the field left justified? Like '%200' only
returns values where the right most 3 characters are '200'. You probably
want LIKE '%200%' or TRIM(LLOC) LIKE '%200'

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of
THarteau@xxxxxxxxxxxxxxxxxx
Sent: Tuesday, December 29, 2009 1:39 PM
To: RPG programming on the IBM i / System i
Subject: Like in embedded SQL

Hi,
Are there any issues when using LIKE in an SQL declare
statement?
I have the following line:
/EXEC SQL
+ DECLARE C6 CURSOR FOR SELECT LPROD, LWHS, LLOT, LLOC, LOPB, LISSU,
+ LADJU, LRCT, LIALOC, LISTAT, WLSTS FROM ILIL01 JOIN ILM ON WWHS =
+ LWHS AND WLOC = LLOC WHERE LWHS = :KEYWHS AND LPROD = :PROD AND L
+ LOC LIKE '%200' ORDER BY WLSTS, LLOC FOR FETCH ONLY
/END-EXEC

It seems to work when it finds 11A200 or 22A200, but it is not returning

2A200. Any ideas? Thanks!

<===================================================>

Terri Harteau
Felker Brothers Corporation
****************
"Do not follow where the path may lead. Go instead where there is no
path
and leave a trail."
Ralph Waldo Emerson

****************




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.