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  

Left Join Query



 
 
Thread Tools Display Modes
  #1  
Old July 17th, 2008, 08:34 PM posted to microsoft.public.access.queries
Danu
external usenet poster
 
Posts: 76
Default Left Join Query

This should be simple but I am having a problem. I have a table which I have
set up in a left join query against a much larger table. The common field is
the account number. (In the larger table, there is only one record per
account number.) Ideally, if there are 30 records in Table A, my results
should have 30 records. I am picking up other pieces of information from
Table B. The only stipulation I have is that the order reason field in Table
B Z. But, even if a record in Table A does not have a matching record in
Table B, shouldn't the record be displayed in the results?

The data type for the account number field in both tables is set to text.
There are no leading spaces in Table A. The only thing that is different
about Table A is that I have to import it from Excel using the Access Import
Wizard.

Help is appreciated.

  #2  
Old July 17th, 2008, 09:19 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Left Join Query

If you use a criteria it will only pull records that match even in a left join.
Soultion is to add to criteria like this --
"Z" OR Is Null
--
KARL DEWEY
Build a little - Test a little


"Danu" wrote:

This should be simple but I am having a problem. I have a table which I have
set up in a left join query against a much larger table. The common field is
the account number. (In the larger table, there is only one record per
account number.) Ideally, if there are 30 records in Table A, my results
should have 30 records. I am picking up other pieces of information from
Table B. The only stipulation I have is that the order reason field in Table
B Z. But, even if a record in Table A does not have a matching record in
Table B, shouldn't the record be displayed in the results?

The data type for the account number field in both tables is set to text.
There are no leading spaces in Table A. The only thing that is different
about Table A is that I have to import it from Excel using the Access Import
Wizard.

Help is appreciated.

  #3  
Old July 18th, 2008, 01:34 PM posted to microsoft.public.access.queries
Danu
external usenet poster
 
Posts: 76
Default Left Join Query

Thanks, Karl! I didn't know that.

"KARL DEWEY" wrote:

If you use a criteria it will only pull records that match even in a left join.
Soultion is to add to criteria like this --
"Z" OR Is Null
--
KARL DEWEY
Build a little - Test a little


"Danu" wrote:

This should be simple but I am having a problem. I have a table which I have
set up in a left join query against a much larger table. The common field is
the account number. (In the larger table, there is only one record per
account number.) Ideally, if there are 30 records in Table A, my results
should have 30 records. I am picking up other pieces of information from
Table B. The only stipulation I have is that the order reason field in Table
B Z. But, even if a record in Table A does not have a matching record in
Table B, shouldn't the record be displayed in the results?

The data type for the account number field in both tables is set to text.
There are no leading spaces in Table A. The only thing that is different
about Table A is that I have to import it from Excel using the Access Import
Wizard.

Help is appreciated.

 




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 01:43 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.