Blank Values are not show as result in query

dhen21dx

Board Regular
Joined
May 10, 2013
Messages
157
Hello,

I have created a query to get the only equal on material and plant, however, the result does not include Null value from plant, can somebody help me how to deal with it?

Table 1
MaterialPlantDest
CDFSSUSHK
CDFSSHK
CDFSSPHHK
Table 2
MaterialPlantQtyDateCreatedBy
CDFSSUS
6​
1/21/2021​
User1
CDFSS
9​
8/29/2021​
User1
CDFSSTW
10​
12/2/2021​
User1
INNER JOINMaterialTable 1
Table 2
PlantTable 1
Table 2
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
60,742
Office Version
  1. 365
Platform
  1. Windows
If you want to return ALL values from one table, and return the matches to another, you do not want to do an INNER JOIN. An INNER JOIN will only return matches.
You want a LEFT JOIN (or sometimes known as a LEFT OUTER JOIN). This link will show you how to do that: Access - Create Queries with Outer Joins

Then, if you want to return a 0 in the unmatched rows instead of a blank space, you can use the NZ function, i.e.
Rich (BB code):
UpdatedQty: Nz([Qty],0)+0
See: MS Access: Nz Function
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,468
Messages
5,764,509
Members
425,219
Latest member
datdanigg

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top