|
My ILE code doesn't work:
strsql = 'with column(total) as +
(select spqty1 from spfs where spitm1 = ? +
union all +
select spqty2 from spfs where spitm2 = ? +
union all +
select spqty3 from spfs where spitm3 = ? +
union all +
select spqty4 from spfs where spitm4 = ? +
union all +
select spqty5 from spfs where spitm5 = ?) +
select sum(total) from column';
exec sql Prepare sel from :strsql;
exec sql Declare Cur CURSOR for sel;
exec sql Open Cur using :fxitem, :fxitem, :fxitem, :fxitem,
:fxitem;
exec sql fetch Cur into :gross :NullInds;
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.