I created successfully a stored procedure with a dynamic pivot. But, when I executed the sp, I got a conversion failed error. Please refer to the below image.
Hope someone will enlighten me. Thanks in advance.