Subquery as Source rather than Criteria Works once but then SQL corrupts

Joined
Sep 7, 2005
Messages
1
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top