Thanks for the attempt.
The problem with the above solution is that for lines 2 and 4 on the input, they would be deduped. As per the requirement the dupe records must be listed in succession. In the case of the 2nd and 4th record they are not in succession yet the 2nd record will be eliminated with that solution. Any other ideas?
I am on version 13.1.
There should be no gaps in history, so as soon as one end date completes there should be the same date for the start date of the next record.
check dieters solution in
You would need to convert the dates to a period etc.
i need to pull a string between two chars.for ex- abc#read#efg .i need to puul the string between the 1st and 2nd '#'.Substring won't help.so i am not sure how to proceed.
Of course Substring will help, ugly, but working:
WHEN x LIKE '%#%#%'
THEN SUBSTRING(SUBSTRING(x FROM POSITION('#' IN x) + 1)
FOR POSITION('#' IN SUBSTRING(x FROM POSITION('#' IN x) + 1)) - 1)