I would like to know how can I use 2 tables data in one Data Report section? They are come with 2 independent SQL statements and I want to show them all in one section. How can I do that?
Are the tables linked with an Index or Cardinal Key???
If you want the tables linked then, it is only a matter of creating a JOIN.
Select [table1].[ID] as [GloablaID],
[table1].[field1] as [table1_field1],
[table1].[field2] as [table1_field2],
[table2].[field1] as [table2_field1],
[table2].[field2] as [table2_field2]
FROM table1 INNER JOIN on [table1].[ID] = [table2].[ID];
or if you have ID fields in table1 that may not be reproduced in table2 then
FROM table1 LEFT JOIN on [table1].[ID] = [table2].[ID];
or if the IDs may be in Table2 but not table1 then
FROM table1 RIGHT JOIN on [table1].[ID] = [table2].[ID];
or if table1 may has IDs that table2 doesn't and table2 has IDs that table1 doesn't then
FROM table1 OUTER JOIN on [table1].[ID] = [table2].[ID];
Craig, mailto:sander@cogeco.ca
"Procrastination is the art of keeping up with yesterday."
I hope my post was helpful!!!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.