Sorry I got my boxes messed up.

Indeed, this query works on V5R3. It does not work on V5R2. This is a better scenario.

Marshall Dunbar/DPS wrote:

I'm on V5R2 and if I try to use the LIKE predicate on a numeric field, I get the same error message,
===
Marshall Dunbar
DPS, Inc.
marshall@xxxxxxxxxxx
direct:(828)635-5561
main office:(317)574-4300 (800)654-4689
====



Bruce Jin <brucej@xxxxxxxxxxxxxxxxxxxx> Sent by: java400-l-bounces@xxxxxxxxxxxx
12/06/2005 04:28 PM
Please respond to
Java Programming on and around the iSeries / AS400 <java400-l@xxxxxxxxxxxx>


To
Java Programming on and around the iSeries / AS400 <java400-l@xxxxxxxxxxxx>
cc

Subject
"select  * from myfile  where cusno like '1%' " fails on V5R3






This is an odd thing on V5R3. If cusno is a numeric field then this query will fail:

select  * from myfile  where cusno like '1%'

STRSQL complains: "Operand not valid in LIKE predicate".

We will have to cast numeric field to character to resolve this.

It is odd because same query works on V5R2.
(It also works in MySQL and MS SQL server).

Could you STRSQL on your box and verify this?

Thanks.


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