Using a subquery as a source rather than as criteria as in the following very simple test example:
SELECT z.DomInt
FROM (SELECT DomInt FROM [Data - UK 2002-2005] a, [~ParameterOriginDest] b where a.Origin = b.Origin) z;
This runs fine - and much more complicated versions do too. I save the code, and the query works fine too.
However, as soon as I look at the SQL, either by the designer or by QueryDefs.SQL, the code mutates into the following:
SELECT z.DomInt
FROM [SELECT DomInt FROM [Data - UK 2002-2005] a, [~ParameterOriginDest] b where a.Origin = b.Origin]. AS z;
Interestingly, some very complicated ones incorporating unions as well work fine.
Anybody know what's going on?
Cheers,
- NickASM
SELECT z.DomInt
FROM (SELECT DomInt FROM [Data - UK 2002-2005] a, [~ParameterOriginDest] b where a.Origin = b.Origin) z;
This runs fine - and much more complicated versions do too. I save the code, and the query works fine too.
However, as soon as I look at the SQL, either by the designer or by QueryDefs.SQL, the code mutates into the following:
SELECT z.DomInt
FROM [SELECT DomInt FROM [Data - UK 2002-2005] a, [~ParameterOriginDest] b where a.Origin = b.Origin]. AS z;
Interestingly, some very complicated ones incorporating unions as well work fine.
Anybody know what's going on?
Cheers,
- NickASM