I am trying to get the script done for my own but I really need help and it is difficult for me to lop through the code in store procedure.
What I want to achieve is, for instance -
There is 2 parameters, Parameter A as start and end time (09:00 - 15:00) what value we know in the table. But when Parameter B send the time like this (07:00 - 10:00), I want return value like this - 07:00-09:00, 09:00-10:00
when parameter B send the time like that (10:00 - 12:00), I want return vaule like this - 10:00-12:00
When parameter B send the time like this (13:00 - 17:00), I want return value like this - 13:00-15:00,15:00-17:00
When Parameter B send the time like that (15:00 - 18:00), I want return value like this - 15:00-18:00
Basically any within rage of Parameter A check with B value and return value if B values are between A otherwise split and return the time.
Thanks in advance.