× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Mike,
Consider my example shown below.
I want one row for each Region and Employee
I pass two parameters (begin and End date)to the compiled QMQRY object
I ORDER BY the same fields as the GROUP BY

SELECT TDAC05,EMPLOYEE,SDADDJ,SDDOCO,SDDCTO,SDAN8,
SUM(CASE WHEN SDSRP1='HDW' THEN SDAEXP * 0.01 ELSE 0 END)
AS WoodGateHdw,
SUM(CASE WHEN SDSRP1='HDW' THEN TD$PXP ELSE 0 END)
AS WoodGateHdw_Profit
FROM F42119J9 WHERE SDADDJ BETWEEN &BEGIN AND &END

GROUP BY
TDAC05,EMPLOYEE,SDADDJ,SDDOCO,SDDCTO,SDADDJ,SDDOCO,SDDCTO,SDAN8
ORDER BY
TDAC05,EMPLOYEE,SDADDJ,SDDOCO,SDDCTO,SDADDJ,SDDOCO,SDDCTO,SDAN8


STRQMQRY QMQRY(J55PROFN ) OUTPUT(*OUTFILE) +
OUTFILE(AMSDTA/F55PROFN ) SETVAR((BEGIN +
&PSOPT1 ) (END &PSOPT2 ))


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

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.