Admitted rookie...of sorts. Please steer to the proper group as needed.
I added another linked table to my MS Access ODBC set up and wow, went
from
seconds (circa 5-9) to over 120. Perhaps an iSeries issue???
Only added file: IWIL01 with a criteria of = "VC".
SELECT BPCSFV04_ECL.LCUST, BPCSFV04_RCM.CNME, BPCSFV04_ECL.LORD,
BPCSFV04_ECL.LPROD, BPCSFV04_ECL.LDESC, BPCSFV04_ECL.LSDTE,
([LQORD]-[LQSHP])*[LNET] AS Expr2, [LQORD]-[LQSHP] AS Expr1,
[IOPB]-[IISS]+[IRCT]+[IADJ] AS Expr3,
<snip>
HAVING (((BPCSFV04_ECH.HSTAT)<>"8") AND ((BPCSFV04_ECL.LID)="CL")) OR
(((BPCSFV04_ECH.HSTAT)<>"C") AND ((BPCSFV04_ECL.LID)="CL"))
ORDER BY BPCSFV04_ECL.LORD, BPCSFV04_ECL.LPROD, BPCSFV04_ECL.LSDTE;
and new is (slow):
SELECT BPCSFV04_ECL.LCUST, BPCSFV04_RCM.CNME, BPCSFV04_ECL.LORD,
BPCSFV04_ECL.LPROD, BPCSFV04_ECL.LDESC, BPCSFV04_ECL.LSDTE,
([LQORD]-[LQSHP])*[LNET] AS Expr2, [LQORD]-[LQSHP] AS Expr1,
BPCSFV04_IIM.ICUSA, BPCSFV04_IIM.IBUYC, <snip>
HAVING (((BPCSFV04_ECH.HSTAT)<>"8") AND ((BPCSFV04_ECL.LID)="CL") AND
((BPCSFV04_IWIL01.WWHS)="VC")) OR (((BPCSFV04_ECH.HSTAT)<>"C") AND
((BPCSFV04_ECL.LID)="CL") AND ((BPCSFV04_IWIL01.WWHS)="VC"))
ORDER BY BPCSFV04_ECL.LORD, BPCSFV04_ECL.LPROD, BPCSFV04_ECL.LSDTE;


|