The problem with the PIVOT function is my case I get insufficient privileges error message(s). Not sure which calls within the pivot function(s) are causing this error.