kit_sune
New member
- Joined
- Jan 14, 2014
- Messages
- 6
- Reaction score
- 0
- Points
- 0
- Excel Version(s)
- 2010
I’ll get straight to the point.
Using fields from a form I created a dummy query thatprovides 4 values in a single record. These values change all the time depending on what the user wants at any given moment, and these values are used to impact a growing number of queries’ filters. The goal was to reference oneor more columns from this dummy query to filter out my data, but I get the error “Query input must contain at least one table or query” when I attempt touse this query.
Here's the example:
Dummy Query created from Form values
Data table
So in this example, when I run the query that references both the main table, and the dummy query, it would pull the first record but not the second one.
I took a basics of SQL class recently and so I tried to do it by inserting a SELECT statement into the WHERE clause, and I even tried to join the query and table together, but this is the error that I receive.
For additional context, I tried to create a query to the query where it only provided the data from the dummy query and received the same result.
I can't provide the SQL because it's not available on this computer, but it's basically just "SELECT a, b, c, from tableName WHERE c IN(SELECT c FROM dummyQryName)"
Thank you for your time,
~Kit
Using fields from a form I created a dummy query thatprovides 4 values in a single record. These values change all the time depending on what the user wants at any given moment, and these values are used to impact a growing number of queries’ filters. The goal was to reference oneor more columns from this dummy query to filter out my data, but I get the error “Query input must contain at least one table or query” when I attempt touse this query.
Here's the example:
Dummy Query created from Form values
Month | Location | EquipType |
1/1/2019 | CA | A |
Data table
Month | Location | EquipmentType | Comment |
1/1/2019 | CA | A | ADASD |
1/1/2019 | CA | B | aASDASD |
So in this example, when I run the query that references both the main table, and the dummy query, it would pull the first record but not the second one.
I took a basics of SQL class recently and so I tried to do it by inserting a SELECT statement into the WHERE clause, and I even tried to join the query and table together, but this is the error that I receive.
For additional context, I tried to create a query to the query where it only provided the data from the dummy query and received the same result.
I can't provide the SQL because it's not available on this computer, but it's basically just "SELECT a, b, c, from tableName WHERE c IN(SELECT c FROM dummyQryName)"
Thank you for your time,
~Kit
Last edited: