|
OK. Thanks for all the help and information. Although none of it
directly solved the issue, each little piece added another clue.
The actual problem was not the *LOVAL/*HIVAL stuff, it was that I was
concatenating single quotes to each of the character fields out of
habit. Apparently the compiler is smart enough to recognize a character
field as such and a numeric field as such and properly format the
statement when referencing the host variables. When I code in Java I
need to make sure that character fields have single quotes so that the
statement is formatted correctly.
Dropping the appending of the single quote constants did the trick. All
of which brings me back around to my original "wish": If I could have
seen the resultant SQL (warts and all) and could do a cut and paste in
to an interactive session I would have immediately seen the issue and
fixed it. A debug view that shows the SQL statement fully rendered and
as it would be executed would be a sweet addition. I would have seen this:
select * from myfile where
myssn between -999999 and 999999 and
myuser between ''PETE' ' and ''PETE' '
Which immediately I would have recognized as wrong.
Thanks to all,
Pete Helgren
As an Amazon Associate we earn from qualifying purchases.
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.