r/DatabaseHelp • u/ShenanigansPara • Mar 10 '20
Database Query not posting any data.
So I have a complicated (to me) Database that was created by someone else many years ago.
This Database has a Query that creates a Table (QryMakeChemTable) . Using 2 individual Tables (ChemInfo and Chems).
Then another Query (EPCRA List) is run using the Following Tables;
(New Sara List, ChemTable).
The New Sara List Table is that is populated with Data.
When I run the following Query (ECPRA) to get my end results it comes up with the headers of the columns but, shows No data.
SELECT [New Sara list].[Section 302 EHS TPQ], [New Sara list].[Section 304 EHS RQ], [New Sara list].[Section 313], [New Sara list].[CERCLA RQ], ChemTable.[CAS #], ChemTable.[Container Size], ChemTable.[Container Unit], ChemTable.[Chemical Name], ChemTable.[Barcode #]
FROM ChemTable INNER JOIN [New Sara list] ON ChemTable.[CAS #] = [New Sara list].[CAS Sort Value]
ORDER BY ChemTable.[Barcode #];
Any idea of a direction to go to to Troubleshoot this?
Thank you in advance.
View all comments
Show parent comment
1
u/wolf2600 Mar 11 '20
So that's the issue... when you do your JOIN on those values, only records where the value exists in both tables will be returned.
From the values you retrieved are you able to figure out why there is a mismatch? Are you joining on the right columns? Or are the values in one column not formatted correctly when they were loaded?