|
Hi Mark, It looks like you're missing the file qualifier on the last reference to cusno: > C+ WHERE b.rmvdate = 0 AND a.cusno = cusno should be > C+ WHERE b.rmvdate = 0 AND a.cusno = b.cusno hth, Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax From: <MWalter@hanoverwire.com> > Does anyone see anything wrong with this statement? > > c/exec sql > c+ DECLARE c1 CURSOR FOR > c+ SELECT a.ordno, a.ordlv, a.ordtyp, a.rdate, a.adate, a.ordtot > c+ FROM Oeordh a JOIN Orhlact b > c+ ON a.ordno = b.ordno AND a.ordlv = b.ordlv > C+ WHERE b.rmvdate = 0 AND a.cusno = cusno > c/end-exec > > c/exec sql > c+ open c1 > c/end-exec > > The pre-compiler tells me that the cursor is not declared. > I've tried it as a prepared statement as well. > > OS/400 V4R5 ILE RPG _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
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.