A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Join 2 tables



 
 
Thread Tools Display Modes
  #1  
Old May 10th, 2010, 06:47 PM posted to microsoft.public.access.queries
MrRJ
external usenet poster
 
Posts: 80
Default Join 2 tables

Hello,

I am a very basic user of MS Access. I love the functionality of it and
would love to learn more. Here is my situation.

I have started up a query that includes 3 tables. One main database(Table
A) and the other two are conversion tables(Tables B & C). The query works
with no issues. Now, I would like to add another major database(Table D). I
believe that I have linked up the joins correctly. However, I noticed that
it is only doing a match between Table A and Table D.

I would like to include ALL records from both Tables A and D. How do I do
that? I appreciate any feedback.

Have a nice day!
  #2  
Old May 10th, 2010, 06:57 PM posted to microsoft.public.access.queries
MrRJ
external usenet poster
 
Posts: 80
Default Join 2 tables

SELECT [DC Conversion].DC, [2010 AOPII with Benefits].DC, [2010 AOPII with
Benefits].[SAP GL], [Category conversion].Category, [SAP P4 GL].[COST
ELEMENT], [Category conversion].[Cost Element Name], Sum([SAP P4 GL].P4) AS
SumOfP4, [2010 AOPII with Benefits].P4
FROM [2010 AOPII with Benefits] INNER JOIN (([SAP P4 GL] INNER JOIN [DC
Conversion] ON [SAP P4 GL].[COST CENTER] = [DC Conversion].[SAP Cost Center])
INNER JOIN [Category conversion] ON [SAP P4 GL].[COST ELEMENT] = [Category
conversion].[SAP GL]) ON ([2010 AOPII with Benefits].[SAP GL] = [Category
conversion].[SAP GL]) AND ([2010 AOPII with Benefits].Category = [Category
conversion].Category) AND ([2010 AOPII with Benefits].DC = [DC Conversion].DC)
GROUP BY [DC Conversion].DC, [2010 AOPII with Benefits].DC, [2010 AOPII with
Benefits].[SAP GL], [Category conversion].Category, [SAP P4 GL].[COST
ELEMENT], [Category conversion].[Cost Element Name], [2010 AOPII with
Benefits].P4;

Here is the SQL version...does this help?

"MrRJ" wrote:

Hello,

I am a very basic user of MS Access. I love the functionality of it and
would love to learn more. Here is my situation.

I have started up a query that includes 3 tables. One main database(Table
A) and the other two are conversion tables(Tables B & C). The query works
with no issues. Now, I would like to add another major database(Table D). I
believe that I have linked up the joins correctly. However, I noticed that
it is only doing a match between Table A and Table D.

I would like to include ALL records from both Tables A and D. How do I do
that? I appreciate any feedback.

Have a nice day!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.