Hello.
I've got a problem with a subquery. It works with SQLServer but not with MS-Access 2003.
The data in both databases are the same.

The SQL query is:

SELECT DISTINCT A.subcuenta, 0 as Debe, 0 as Haber
FROM A, B
WHERE NOT EXISTS
(SELECT Subcuenta FROM
(SELECT DISTINCT A.subcuenta
FROM A, B
WHERE ( A.asiento = B.asiento AND A.ejercicio = B.ejercicio)
AND (A.subcuenta BETWEEN 100000000 AND 700000000)
AND (A.ejercicio = 1) AND (A.Fecha < #01/02/2000#))
AS T3
WHERE A.subcuenta = T3.subcuenta )
AND (A.asiento = B.asiento AND A.ejercicio = B.ejercicio)
AND (A.subcuenta BETWEEN 100000000 AND 700000000)
AND (A.Fecha BETWEEN #01/02/2000#)
I'm trying with NOT EXISTS because the DB is very big, and the query results are too slow.
Any idea??

PLEASE HELP!