Need Help with a SQL

General
General covers Articles, Reference documentation, FAQs, Downloads and Blogs that do not belong to a specific subject area. General-purpose Articles about everything and anything

Need Help with a SQL

Hi Gurus,

 

Can you please help me the SQL logic for the below senario,  DATE1 and DATE2 are two columns in my table and DATE3 is the execpted output. 

 

DATE 1 DATE 2DATE3 Expected output
2017-02-182016-10-11Null
2017-01-232017-01-132017-02-18
2017-01-232017-01-212017-02-18
2017-01-232017-01-232017-02-18
2017-01-232017-01-242017-02-18
2017-02-042017-01-272017-01-23
2017-02-042017-01-302017-01-23
2017-02-042017-02-032017-01-23
2017-02-112017-02-042017-02-04
2017-02-112017-02-102017-02-04
2017-02-182017-02-112017-02-11
2017-02-182017-02-132017-02-11
2017-02-182017-02-172017-02-11
2017-02-182017-02-182017-02-11
2017-02-182017-02-192017-02-11
2017-02-182017-02-282017-02-11
2017-02-182017-03-272017-02-11
2017-02-182017-03-282017-02-11

 

Thanks .