I have a series of 4 tables that I need to loop through and pull information to make a new table in an access database:
SELECT *
FROM tbl_f
INNER JOIN( SELECT P, Area
FROM tbl_l
UNION ALL
SELECT P, Area
FROM tbl_m
UNION ALL
SELECT P, Area
FROM tbl_w) ON tbl_f.P;
My Code includes:
Dim strSQL as string
strSQL = "SELECT * FROM tbl_f inner JOIN( SELECT P, Area FROM tbl_l UNION ALL SELECT P, Area FROM tbl_m UNION ALL SELECT P, Area FROM tbl_w) ON tbl_f.P;"
I keep getting an error that the JOIN is not supported. I've used joins this way before, but any ideas?
....SELECT P, Area FROM tbl_w) as q ON tbl_f.P=q.p;