|
Be gentle, cause this SQL stuff is all new to me. If I define my SQL SELECT as a constant (not to scale so it doesn't wrap): D FetchSQL C 'SELECT * FROM dbmstf/ordtlhst + D WHERE onrcu IN (SELECT onrcu FROM + D dbmstf/orhdrhst WHERE + D shpdtiso >= DATE(:bgndate) + D AND + D shpdtiso <= DATE(:enddate)) + D ORDER BY NAMEK10, DATEKISO, TIMEKISO' Then, in the calcs (which are all procedureized and prototyped), I do: MySQL = FetchSQL; C/exec sql C+ declare MyCursor cursor C+ for mainStatement C/end-exec C/exec sql C+ prepare mainStatement C+ from :MySQL C/end-exec And then start fetching, will the contents of host variables 'bgndate' and 'enddate' automatically be put in the proper place? If not, why not. If yes, then I'll figure out what I screwed up cause I get SQL error 26501. Thanks.
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.