Need help in the logic
Posted: Wed Dec 05, 2018 8:24 pm
Need help in below topic
input data
Col1(Timestamp) Col2(timestamp)
2017-12-31 10:05:06 | 2017-12-31 10:05:06
2018-01-01 07:20:05 | 2018-01-01 07:23:05
2018-01-01 07:22:05 | 2018-01-01 07:25:05
2019-01-01 06:00:04 | 2019-01-01 06:00:05
output needed
2017-12-31 10:05:06 | 2017-12-31 10:05:06
2018-01-01 07:20:05 | 2018-01-01 07:25:05
2019-01-01 06:00:04 | 2019-01-01 06:00:05
we have to compare col1 and col2, if col1 timestamp falls between col2 for exp shown above 2 and 3 rd record need 2nd record as op
Thanks in advance..
input data
Col1(Timestamp) Col2(timestamp)
2017-12-31 10:05:06 | 2017-12-31 10:05:06
2018-01-01 07:20:05 | 2018-01-01 07:23:05
2018-01-01 07:22:05 | 2018-01-01 07:25:05
2019-01-01 06:00:04 | 2019-01-01 06:00:05
output needed
2017-12-31 10:05:06 | 2017-12-31 10:05:06
2018-01-01 07:20:05 | 2018-01-01 07:25:05
2019-01-01 06:00:04 | 2019-01-01 06:00:05
we have to compare col1 and col2, if col1 timestamp falls between col2 for exp shown above 2 and 3 rd record need 2nd record as op
Thanks in advance..