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  

Multiple table query displays only one record



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2010, 11:05 PM posted to microsoft.public.access.queries
Elaine_Moore
external usenet poster
 
Posts: 1
Default Multiple table query displays only one record

I have a table the has information about grant applications. I have another
table that has the names and addresses of the schools related to the
applications. When I do a querry it either shows only one record or all of
the information form one or the other depending on whetner I click 2 or 3 in
the properties window. How do I get it to show all of the records from all of
the columns that I have chosen from both tables?

  #2  
Old May 18th, 2010, 12:12 AM posted to microsoft.public.access.queries
PieterLinden via AccessMonster.com
external usenet poster
 
Posts: 307
Default Multiple table query displays only one record

Elaine_Moore wrote:
I have a table the has information about grant applications. I have another
table that has the names and addresses of the schools related to the
applications. When I do a querry it either shows only one record or all of
the information form one or the other depending on whetner I click 2 or 3 in
the properties window. How do I get it to show all of the records from all of
the columns that I have chosen from both tables?


Full outer joins require basically unioning a left join and a right join.
e.g.

SELECT fieldlist
FROM a LEFT JOIN b
ON a.fieldx = b.fieldy
UNION ALL
SELECT fieldlist
FROM a RIGHT JOIN b
ON a.fieldx = b.fieldy

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...eries/201005/1

  #3  
Old May 18th, 2010, 07:28 PM posted to microsoft.public.access.queries
Elaine_Moore via AccessMonster.com
external usenet poster
 
Posts: 1
Default Multiple table query displays only one record

Hi Pieter,

Here is the SQL for my query. I am not sure what you are saying it should
look like. I am a beninner here, so please be patient with my ignorance.

SELECT tblM2010Excel.FileNumber, tblM2010Excel.[Teacher Name],
tblSchoolsExcel.ID, tblSchoolsExcel.SchoolName, tblSchoolsExcel.StreetAddress,
tblSchoolsExcel.City, tblSchoolsExcel.Province, tblSchoolsExcel.PostalCode
FROM tblSchoolsExcel INNER JOIN tblM2010Excel ON tblSchoolsExcel.[SchoolName]
= tblM2010Excel.[School Name];

PieterLinden wrote:
I have a table the has information about grant applications. I have another
table that has the names and addresses of the schools related to the
applications. When I do a querry it either shows only one record or all of
the information form one or the other depending on whetner I click 2 or 3 in
the properties window. How do I get it to show all of the records from all of
the columns that I have chosen from both tables?


Full outer joins require basically unioning a left join and a right join.
e.g.

SELECT fieldlist
FROM a LEFT JOIN b
ON a.fieldx = b.fieldy
UNION ALL
SELECT fieldlist
FROM a RIGHT JOIN b
ON a.fieldx = b.fieldy


--
Message posted via http://www.accessmonster.com

 




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 08:23 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.