>> products; they seem to cast the parameter's data type incorrectly.  Usually
>> when I've had problems it's because I'm trying to use a parameterized query
>> with a numeric field being one of the parameters.  This doesn't seem to be
>> your case, but I'll share what I do anyways.  Use the Digits() function to
>> turn your numeric field into an alpha/numeric field and then compare to a
>> character value.
>> In your case, the Where statement should be changed to:
>> Digits(PZBSB) > '00000000'

> You really don't want to do that, you'd force the AS/400 to run the digits
> command for each row before comparing it. If there is an index that it could
> use you just threw it out the window.

Performance isn't the point to this exercise though.  The point is to get a
parameterized query to work correctly when one of the parameters is compared to
a numeric field on the 400.  If you know of a way to do this without resorting
to Digits() I'd love to hear it.

If you haven't run into this problem before, try creating a parameterized query
in MS Query which compares against a numeric field.  In MS Query, it will work
properly, but when it comes time to download to Excel, the ODBC driver will
throw an error.


Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 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.