By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,275 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,275 IT Pros & Developers. It's quick & easy.

Query - How to filter criteria from tables

anoble1
100+
P: 229
See picture.
I have some fields under criteria I would like to show. Example I would like this query to pull all part numbers in these 3 tables on this main query. What am I missing or how can this be done?

How can i make this query show all the records in all those tables? Each table has about 15 records (15 part numbers)

Attached Images
File Type: png 2020-01-21 07_42_35-Window.png (9.7 KB, 232 views)
4 Weeks Ago #1
Share this Question
Share on Google+
3 Replies


NeoPa
Expert Mod 15k+
P: 31,660
Perhaps you could rephrase the question so that it makes clearer sense?

I gave up trying to work out what you should have said after the first couple of tries left me scratching my head.
4 Weeks Ago #2

Rabbit
Expert Mod 10K+
P: 12,392
I'm confused as well, the title says you want to filter the tables, but then you say you want to show all the records. You can't do both. If you want to show all the records, then don't filter anything.
4 Weeks Ago #3

twinnyfo
Expert Mod 2.5K+
P: 3,364
anoble1,

I think what you need is a UNION Query, which will list all the Parts from each Table. For example,

Expand|Select|Wrap|Line Numbers
  1. SELECT PartNo, PartDesc FROM Table1 
  2. UNION ALL 
  3. SELECT PartNo, PartDesc FROM Table2 
  4. UNION ALL 
  5. SELECT PartNo, PartDesc FROM Table3 
  6. GROUP BY PartNo, PartDesc 
  7. ORDER BY PartNo;
[the GROUP BY clause will consolidate any duplicate parts]

Also, this is just a guess, and we have no idea what your Tables are about (or their relationships).

Don't know if this hepps a who' heap or just confuses matters more.
4 Weeks Ago #4

Post your reply

Sign in to post your reply or Sign up for a free account.