On 18Apr2012 08:43, Maassel, John R. wrote:
<<SNIP>>

My SQL statement looks like this:

SELECT INVID, INVCONO, INVUNNO, INVNUM, INVDATE, INVVENDNM
, INVFOODAMT, INVNFAMT, INVCOMMENT, INVACCT, INVVHVECO
, INVVHIREF, INVVHAUDT, INVVHVEND, INVIMS, INVVEND
FROM FINPINV
WHERE invcono = @cono
AND invunno = @unno
AND invvhiref IS NULL

I then add the parameters in and run the query. I get:
Token INVUNNO was not valid. Valid tokens: FOR SKIP WITH FETCH ORDER UNION
EXCEPT OPTIMIZE.

FWiW: If the replacement text for @cono is blank(s) or the empty string, having been applied to the statement text prior to SQL parsing, then the adjusted statement [e.g. "... WHERE invcono = AND invunno =..."] should fail with the -104 sqlcode for a syntax error, having identified the INVUNNO located after the "AND" as being problematic along with the noted list of expected valid tokens.

Regards, Chuck

This thread ...

Follow-Ups:

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

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