S
shapper
Hello,
I have the following Query:
SELECT A.ID, A.Name
FROM A
WHERE (((A.ID) Not In (SELECT DISTINCT B.ID FROM B WHERE Year
([CreatedDate])=2006))
AND ((A.CODE)="XYZ"));
This query is working.
Can't I move the "SELECT DISTINCT B.ID ..." to a different query?
Something like:
SELECT A.ID, A.Name
FROM A
WHERE (((A.ID) Not In ([SUBQUERY])) AND ((A.CODE)="XYZ"));
and SUBQUERY would be:
SELECT DISTINCT B.ID
FROM B
WHERE Year([CreatedDate])=2006
I am always asked for the value of SUBQUERY when I run main query.
Thank You,
Miguel
I have the following Query:
SELECT A.ID, A.Name
FROM A
WHERE (((A.ID) Not In (SELECT DISTINCT B.ID FROM B WHERE Year
([CreatedDate])=2006))
AND ((A.CODE)="XYZ"));
This query is working.
Can't I move the "SELECT DISTINCT B.ID ..." to a different query?
Something like:
SELECT A.ID, A.Name
FROM A
WHERE (((A.ID) Not In ([SUBQUERY])) AND ((A.CODE)="XYZ"));
and SUBQUERY would be:
SELECT DISTINCT B.ID
FROM B
WHERE Year([CreatedDate])=2006
I am always asked for the value of SUBQUERY when I run main query.
Thank You,
Miguel