Hi all -
I'm a bit new to Oracle SQL so I don't know all the best tips and tricks to accomplish what I need to do - given date ranges of different categories, I need to remove any dates from the first category which overlap with the 2nd. So, say I have
Range 1: CAT_A, 2017-01-01 to 2017-01-14
Range 2: CAT_B, 2017-01-07 to 2017-01-12
I need to end up with:
CAT_A, 2017-01-01 to 2017-01-06
CAT_B, 2017-01-07 to 2017-01-12
CAT_A, 2017-01-13 to 2017-01-14
And to further complicate things there could also be more than one Category B record to work with. Category B records could also be a single day. Any help would be much obliged.