Thank you.  You explained to me what they were talking about in the 
Infocenter.  Replace all trailing blanks with percent signs.

SELECT * FROM ROB/XYZ1 WHERE NAME LIKE 'ROB            '
....+....1....+ 
NAME 
ROB 
********  End of data

SELECT * FROM ROB/XYZ1 WHERE NAME LIKE 'ROB%           '
....+....1....+ 
NAME 
ROB 
********  End of data

SELECT * FROM ROB/XYZ1 WHERE NAME LIKE 'ROB%%%%%%%%%%%%'
....+....1....+
NAME 
ROB 
ROBERTS, SAM
...
...


Rob Berendt
-- 
Group Dekko Services, LLC
Dept 01.073
PO Box 2000
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





"Dan Bale" <dbale@xxxxxxxxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
10/05/2004 04:09 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Fax to

Subject
RE: multiple search arguments in one scan?






You were the only one that thought so, Rob!  <g>

The primary reason I'm not using it, like Steve Landess pointed out, is 
that
using LIKE on a string that does not contain any wildcards does not return
any results.  But now I see why.  I didn't pick up on the importance of 
the
trailing blanks when using LIKE but not when using the equal sign until 
just
now.

Testing just a bit more.  Finding that I still need to use LIKE or '='
depending on the situation:

 When testing for NAME = 'BALE, DAN       ',

  NAME LIKE 'BALE, DAN%      '  does *not* find record
  NAME LIKE 'BALE, DAN%'        *does* find record
  NAME LIKE 'BALE, DAN'         does *not* find record
  NAME LIKE 'BALE, DAN       '  *does* find record

So, I either need to finagle the ending quote, or I need to change the
predicate.  Probably just easier to change the predicate based on whether
the scan finds a wildcard.

Or am I still not getting it?

db

> -----Original Message-----
> From: rpg400-l-bounces@xxxxxxxxxxxx / rob@xxxxxxxxx
> Sent: Tuesday, October 05, 2004 4:24 PM
>
> Hey, I thought my test results showed you that it doesn't matter if you
> use like or =.
>
> Rob Berendt

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-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.