I have a function that returns the following information when called:
select * from functionName(null, '1 jan 2016', '30 dec 2016')
output:
pcode PayoutDate
100 2016-02-28 00:00:00:000
100 2016-05-31 00:00:00:000
100 3016-08-31 00:00:00:000
100 3016-11-30 00:00:00:000
103 2016-02-28 00:00:00:000
103 2016-05-31 00:00:00:000
103 3016-08-31 00:00:00:000
103 3016-11-30 00:00:00:000
We do payouts to our clients at the end of February, May, August and November.
So what I want to achieve is to have each month have its own date as shown below:
pcode May August November
100 2016-05-31 00:00:00:000 3016-08-31 00:00:00:000 3016-11-30 00:00:00:000
103 2016-05-31 00:00:00:000 3016-08-31 00:00:00:000 3016-11-30 00:00:00:000
How can I split the data set to reflect as shown above?
I don't really know how can this be tackled, Anyone with any idea?