Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Tue Apr 15 11:58:41 CDT 2008
Got it. Thanks. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Drew Wutka Sent: Tuesday, April 15, 2008 8:46 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Alias Table Name 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. -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com No virus found in this incoming message. Checked by AVG. Version: 7.5.519 / Virus Database: 269.22.13/1377 - Release Date: 4/14/2008 9:26 AM