S
Steve Perkins
I have a situation with Access 2000 in which I need to relate three tables
together in order to retrieve the appropriate rows. The raw SQL looks
something like this:
SELECT table_1.foo, table_2.bar
FROM table_1, table_2, mapping_table
WHERE table1.id = mapping_table.id
AND table2.description = mapping_table.description
AND table1.company = table2.company;
So there are three tables that have to be joined together, all in one step.
I can't chain together nested INNER JOIN's, because it's not just a matter of
the first table joining the second and the second joining the third... the
first and third join on a column as well.
A WHERE clause stretching across more than two tables like this is fairly
trivial in full-sized relational databases, but Access treats it strangely.
Access handles the first WHERE criteria, but then prompts me for input on the
next two AND clauses. Access thinks those are parameters or something. Does
anyone know if what I'm doing is possible, or whether Access simply lacks the
ability to join across three tables in one step? (I don't have any control
over changing the table structure) Thanks in advance!
together in order to retrieve the appropriate rows. The raw SQL looks
something like this:
SELECT table_1.foo, table_2.bar
FROM table_1, table_2, mapping_table
WHERE table1.id = mapping_table.id
AND table2.description = mapping_table.description
AND table1.company = table2.company;
So there are three tables that have to be joined together, all in one step.
I can't chain together nested INNER JOIN's, because it's not just a matter of
the first table joining the second and the second joining the third... the
first and third join on a column as well.
A WHERE clause stretching across more than two tables like this is fairly
trivial in full-sized relational databases, but Access treats it strangely.
Access handles the first WHERE criteria, but then prompts me for input on the
next two AND clauses. Access thinks those are parameters or something. Does
anyone know if what I'm doing is possible, or whether Access simply lacks the
ability to join across three tables in one step? (I don't have any control
over changing the table structure) Thanks in advance!