I have query contains both start and end date, i would like to filter out data based on two dates. I need only 2019 and higher data either based on start or end date, if you can have a look examples. i need ID 1,2,3,6,7 and 4,5 is not required. I have tried using Year function on both dates, but like to know any other easy solution for this.
CREATE TABLE #TEMP
INSERT INTO #TEMP
SELECT 1,'01/01/2014', '01/01/2019'
SELECT 2,'01/01/2015', '01/01/2020'
SELECT 3,'01/01/2019', '12/31/2019'
SELECT 4,'01/01/2012', '12/31/2018'
SELECT 5,'01/01/2010', '10/01/2016'
SELECT 6,'06/01/2020', '10/01/2020'
SELECT 7,'01/01/2021', '03/01/2021'
- This topic was modified 1 month, 1 week ago by koti.raavi.
- This topic was modified 1 month, 1 week ago by koti.raavi. Reason: Spelling