Help for Left Outer Join and a SUM with Access2000
Hi,
Delphi 5, MSAccess2000, MS Jet 4.0
I'm trying to execute the following query using a TADOQuery:
Add(format('SELECT l.%s, ',[fldLoadID]));
Add(format('l.%s, l.%s, ',[fldOrigLocationID, fldDestLocationID]));
Add(format('SUM(lsm.%s) AS %s',[fldActivityID, fldExpr1]));
Add(format('FROM %s l',[tblLoads]));
Add(format('LEFT OUTER JOIN %s lsm',[tblLoadStopMoves]));
Add(format('ON l.%s = lsm.%s',[fldLoadID, fldLoadID]));
Add(format('AND l.%s = ''A''',[fldActiveStatus]));
Add(format('GROUP BY l.%s, l.%s, ',[fldLoadID, fldOrigLocationID]));
Add(format('l.%s, l.%s',[fldDestLocationID, fldActiveStatus]));
Add(format('ORDER BY l.%s',[fldLoadID]));
When debugging I get to the third line (the one with the SUM in it) and I
get an access violation in msjet40.dll and then an oleexception saying "join
expression not supported". Any ideas? I have no problem with this when I
use a SQLServer2000. Do I need a different version of Jet? Or???
Thanks in advance for your help!!
--
John Kring
jkr...@new.rr.com