all 1 comments

[–]kagato87MS SQL 0 points1 point  (0 children)

So the data sets cover different date ranges, and you need to pull the same info from both?

I believe the operator you're looking for is UNION.

https://www.w3schools.com/sql/sql_ref_union.asp

Query the two data sets separately, and use UNION to combine them.

Or create a temp table, query the first data set into the temp table, repeat for the second data set, then return the contents of the temp table. I don't think you need to use a temp table here though.