bstirling
New member
- Joined
- Sep 13, 2016
- Messages
- 11
- Reaction score
- 0
- Points
- 1
- Location
- Burlington, MA
- Excel Version(s)
- Excel 2016, Excel Office365
Hi,
I have a need where have a table with two columns (built from a query) and the data needs to be used to select rows from another two tables via a join.
So the data looks like this.
Col 1
Now the trick is that I want to select from SQL the data that matches both. And the table could be dynamic where new years/values are added. Is this possible?
So, in SQL it would look like this
SELECT * FROM Table1 WHERE (Year=2020 and Value=Value1) or (Year=2021 and Value=Value2)
Thanks,
Bruce
I have a need where have a table with two columns (built from a query) and the data needs to be used to select rows from another two tables via a join.
So the data looks like this.
Col 1
Year | Field value |
2020 | Value1 |
2021 | Value2 |
Now the trick is that I want to select from SQL the data that matches both. And the table could be dynamic where new years/values are added. Is this possible?
So, in SQL it would look like this
SELECT * FROM Table1 WHERE (Year=2020 and Value=Value1) or (Year=2021 and Value=Value2)
Thanks,
Bruce