can someone help me to split ONE record into multiple lines with the same batch_id if the service start date and service end date are more than 30 days apart.
For e.g the current data is in the format below
batch_id service start date service end date
99999 2/15/2008 4/25/2008
Need to be transformed to
batch_id service start date service end date
99999 2/15/2008 3/16/2008
99999 3/16/2008 4/15/2008
99999 4/15/2008 4/25/2008
i need a SQL solution.
any help is appreciated.
For e.g the current data is in the format below
batch_id service start date service end date
99999 2/15/2008 4/25/2008
Need to be transformed to
batch_id service start date service end date
99999 2/15/2008 3/16/2008
99999 3/16/2008 4/15/2008
99999 4/15/2008 4/25/2008
i need a SQL solution.
any help is appreciated.