K
kmccoskey
I want to do the subquery as follows but the left join will not work in
access. The reason is that I need to have
the ability to use subqueries with joins in the where clause so I can easily
do multiple joins. Any ideas?
EQUA JOIN
SELECT A.ID, A.NAME, C.ID1, C.ID2
FROM TEST_1 A, TEST_DATA_1_2 C
WHERE A.ID = (SELECT X.ID FROM TEST_1 X WHERE X.ID=C.ID1)
LEFT JOIN don't work
SELECT A.ID, A.NAME, C.ID1, C.ID2
FROM TEST_1 A, TEST_DATA_1_2 C
WHERE A.ID = (SELECT X.ID FROM TEST_1 X INNER JOIN C ON X.ID=C.ID1)
Error Message: The Microsoft Jet database engine cannot find the input
table or query 'C' Make sure it exists and that its name is spelled
correctly. If I don't use a join the query works but it doesn't allow me to
get all the rows from table test_1
access. The reason is that I need to have
the ability to use subqueries with joins in the where clause so I can easily
do multiple joins. Any ideas?
EQUA JOIN
SELECT A.ID, A.NAME, C.ID1, C.ID2
FROM TEST_1 A, TEST_DATA_1_2 C
WHERE A.ID = (SELECT X.ID FROM TEST_1 X WHERE X.ID=C.ID1)
LEFT JOIN don't work
SELECT A.ID, A.NAME, C.ID1, C.ID2
FROM TEST_1 A, TEST_DATA_1_2 C
WHERE A.ID = (SELECT X.ID FROM TEST_1 X INNER JOIN C ON X.ID=C.ID1)
Error Message: The Microsoft Jet database engine cannot find the input
table or query 'C' Make sure it exists and that its name is spelled
correctly. If I don't use a join the query works but it doesn't allow me to
get all the rows from table test_1