delphi6BDE
Programmer
Can anybody help me change the following subquery into an unmatched query? The way I wrote it is taking 30+ seconds to run which is unacceptable
SELECT tblZs.strZ, tblFS.strFS, tblZs.entID
FROM tblZs INNER JOIN (tblA INNER JOIN tblFS ON tblA.aID = tblFSA.aID) ON tblZs.zoneID = tblA.zoneID
WHERE (((Exists (select tblHistory.fsID from tblHistory where tblHistory.fsID = tblFS.fsID and tblHistory.specsID=3853))=False) AND ((tblZs.entID)=1));
Any help would be appreciated. I've tried using the unmatched wizard, but it doesn't give me any results. The above query I wrote is giving me the proper results, just slowly. The users of the program it runs in would be running it multiple times per customer, so speed is a factor.
SELECT tblZs.strZ, tblFS.strFS, tblZs.entID
FROM tblZs INNER JOIN (tblA INNER JOIN tblFS ON tblA.aID = tblFSA.aID) ON tblZs.zoneID = tblA.zoneID
WHERE (((Exists (select tblHistory.fsID from tblHistory where tblHistory.fsID = tblFS.fsID and tblHistory.specsID=3853))=False) AND ((tblZs.entID)=1));
Any help would be appreciated. I've tried using the unmatched wizard, but it doesn't give me any results. The above query I wrote is giving me the proper results, just slowly. The users of the program it runs in would be running it multiple times per customer, so speed is a factor.