nerdalert1
Programmer
Ok this might be totally confusing but I am giving it a shot because I am completly confused right now on this and need help. I have a large query that is using a Cross Join in it. Here is the basic part of it.
----------------------------------------------
MAIN QUERY called CC1.
CROSS JOIN tblDepartments INNER JOIN
(QUERY..which has field DeptNumber in SELECT) CC2 ON tblDepartments.DeptNumber = CC2.DeptNumber
----------------------------------------------
the above query worked and it was fine until a change occurred. CC2 is querying a temp table that had DeptNumber in it. However now this Temp table is storing a DeptCustID that is from a table called tblDeptCust which has the DeptNumber in it. So now it looks like this and I dont know how to link to this new tbale called tblDeptCust to get to it.
------------------------------------------------
CROSS JOIN tblDepartments(I need this to stay as is because the MAIN QUERY pulls fields from it) INNER JOIN
(QUERY..which is still the temp table that now has DeptCustID in it) CC2.
------------------------------------------------
How right here do I do the Join to the table tblDeptCust where tblDepartments.DeptNumber = tblDeptCust.DeptNumber
Thanks all
----------------------------------------------
MAIN QUERY called CC1.
CROSS JOIN tblDepartments INNER JOIN
(QUERY..which has field DeptNumber in SELECT) CC2 ON tblDepartments.DeptNumber = CC2.DeptNumber
----------------------------------------------
the above query worked and it was fine until a change occurred. CC2 is querying a temp table that had DeptNumber in it. However now this Temp table is storing a DeptCustID that is from a table called tblDeptCust which has the DeptNumber in it. So now it looks like this and I dont know how to link to this new tbale called tblDeptCust to get to it.
------------------------------------------------
CROSS JOIN tblDepartments(I need this to stay as is because the MAIN QUERY pulls fields from it) INNER JOIN
(QUERY..which is still the temp table that now has DeptCustID in it) CC2.
------------------------------------------------
How right here do I do the Join to the table tblDeptCust where tblDepartments.DeptNumber = tblDeptCust.DeptNumber
Thanks all