How to get a union of two data sets?
I have a business view that have two date fields (SRPDJ and CDJ). Users will enter into data selection whatever they want and I want to use whatever they entered and get all records that match that criteria and fall within date ranges for SRPDJ and CDJ
For example
Let's say users enter Community = 'OTT' into the data selection then
I want to get all records where Community is 'OTT' and SRPDJ is between 1/1/2016 and 12/31/2016
And
All records where Community is 'OTT' and CDJ is between 1/1/2017 and 12/31/2017
So it's a union of two data sets. Users will enter the date ranges into processing options but I hard code it here for simplicity. Here's my code