[AccessD] Alias Table Name

Drew Wutka DWUTKA at Marlow.com
Tue Apr 15 10:46:27 CDT 2008


Not with a subquery.

In a subquery, you need to know where the datasource is.

SELECT tblA.Field1, tblB.Field2, (SELECT tblA.Field2 FROM tblA WHERE
tblA.Field5=T1.Field5)
FROM tblA AS T1 INNER JOIN tblB ON T1.Field3=tblB.Field3

Notice, in the SQL above, the subquery is using one of the same tables
as the parent query.  By designating the parent query's tblA as T1, the
subquery knows that it needs to pull the data from the parent query's
recordset to complete it's work.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
at Beach Access Software
Sent: Tuesday, April 15, 2008 10:33 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Alias Table Name

Can't the field from the query be specified  like you qualify a field
from a
table?  For example if the field ProductNumber is in both Table tblA and
tblB, when referring to ProductNumber you'd have to specify
tblA.ProductNumber or tblB.ProductNumber.

Rocky





 	
	

The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list