Using Delphi's Database Explorer on a Paradox table and cannot seem to get a nested query to reference the outer table e.g.
SELECT
PayFreq,
(select count(*) from LocalEmps2 AS E2
WHERE E2.PayFreq = E1.PayFreq) FCount
FROM LocalEmps1 E1
GROUP BY PayFreq
Returns FCount as zero whether there are any matching records or not (even when the tables are identical).
Many thanks in advance.
Paul.
SELECT
PayFreq,
(select count(*) from LocalEmps2 AS E2
WHERE E2.PayFreq = E1.PayFreq) FCount
FROM LocalEmps1 E1
GROUP BY PayFreq
Returns FCount as zero whether there are any matching records or not (even when the tables are identical).
Many thanks in advance.
Paul.