473,394 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Multiple Joins in Access

Hi,

Is it possible to access a tables data over multiple joins? For instance, for each row of Table A, I want the associated data from Table D. Is this possible in access? If it's not, could you suggest an alternative? Please see the example. Many Thanks.

Expand|Select|Wrap|Line Numbers
  1. SELECT Table A.Person_Name, Table D.Favorite_Sport
  2. FROM (Table A 
  3. LEFT JOIN Table B ON Table A.ID=Table B.ID)
  4. LEFT JOIN Table C ON Table B.ID=Table C.ID
  5. LEFT JOIN Table D ON Table C.ID=Table D.ID
Nov 25 '10 #1
3 1924
orangeCat
83 64KB
What exactly are you trying to do? What have you tried so far?
What is the structure of your tables?

Any name you define that includes a space must be enclosed in [] for Access.

Table A becomes [Table A]

However, you should NOT use names with spaces. It is a very bad habit.... avoid it.
Nov 25 '10 #2
Hey, thanks for your reply - my tables don't actually have spaces in, they are just for example. Here's what I'm trying to do...

For each row in Table A, there's a lookup table (Table B) which finds the associated value. Table C, which is referenced through the lookup table (Table B) has the associated identifier. Table D then has specific items related to Table A (e.g. Total number of problems). I want to sum up the problems for each association.

This is why I need to access information in Table D from Table A. Please help! My mind is blown!

Many Thanks.
Nov 26 '10 #3
NeoPa
32,556 Expert Mod 16PB
Yes John. This can be done. Access only handles JOINs against a single entity at a time though (EG. (TableA JOIN TableB) JOIN TableC).

There are various other rules, including no INNER JOINS to the right of any LEFT or RIGHT JOINs.

The simplest way to proceed though, is either to provide the requested information - the layout of the tables you want to work with, or to use the query design view and link the tables there. View / SQL then shows you the resultant SQL.

PS. Be very careful when using examples. Sometimes (yours is a case in point), the failure to put the example together properly ends up with quite a misleading example. Unless you're going to pay proper attention to it, it is much better to use real life examples.
Nov 28 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Prem | last post by:
Hi All Database Gurus, I am trying to write code which will produce all the possible valid queries, given tables and join information for tables. Right now i am just trying to construct all the...
1
by: intl04 | last post by:
Are there any problems with multiple user access to the same Access database on a shared network drive? I have 'shared' chosen for 'default open mode'. As for the record locking properties, I...
1
by: Pieter Breed | last post by:
Hi All. I would like to put a question to the Access gurus. I have a database with amonst others, three tables. Table one look like this: ------------------------------- Supplier_Id |...
2
by: judelakmal | last post by:
I have an application written in vb 6.0 application. It connects multiple MS Access databases sometimes. I would like to know is will this effects the performance of the application.
7
by: SeaviewBlue | last post by:
Howdy folks, I am new to the site and new to joins, so I'm hoping I can get some much needed assistance. Using ASP, VBscript & an Access 2003 db, I am building a page to display results from...
2
by: narendra vuradi | last post by:
Hi I have a requirement where in i haev to convert the SQL from Oracle to the one which will run on the SQL server. in the Oracle Query i am doing multiple joins, between some 13 tables. and...
2
by: beargrease | last post by:
I'm kind of comfortable with basic joins, but a current project requires a complex query of many tables. The GROUP_CONCAT(DISTINCT ...) function has been very useful as returning my values as comma...
3
by: modernshoggoth | last post by:
G'day all, I'm trying to update a single table (containing plans for flights) with information from the same and other tables (containing info for organisations and locations). tblFlightPlans...
13
beacon
by: beacon | last post by:
I'm working on creating a dynamic report that is based on a crosstab query. It's similar to the method described at the following link: http://support.microsoft.com/kb/328320 I've tweaked the...
0
by: kalinda | last post by:
I am trying to make multiple joins between two tables and am at a loss. I've tried a variety of things with this being the latest, but it pulls all records multiple times. Basically I have a main...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.