|
The following SQL statement works fine from the Ops-Nav "Run SQl Statements" and as a Query Manager SQL query. But when run from the STRSQL screen, it returns no records yet it doesn't give any error message either. Note that the QM query and the STRSQL are done interactively from the same job, so it isn't a problem with different files being used. I'm guessing STRSQL has a problem with the common-table expression or the correlated sub-query. Has anyone seen this before? Thanks, Charles with tbl as (select pimodl, piiall, dochdt from mason/mppriv, mason/tpdocu where pimodl = domelc and dochdt >= 20031223 group by pimodl, piiall, dochdt order by pimodl, dochdt asc) select tbl.pimodl, tbl.piiall, tbl.dochdt, (piiall - (select sum(b.doqty) from mason/tpdocu b where b.domelc = tbl.pimodl and b.dochdt between 20031223 and tbl.dochdt )) as EndingQty from tbl order by 1, 3 asc
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.