I currently need to write a dynamic SQL query because I need to pivot a column based on the distinct values that appear in a given column (and I do not want to manually specify which of these values I want pivoted as there are many). I tried writing a dynamic query but SQL query runner does not seem to be able to process it.
Is there anyway I can work around this?
The dynamic SQL query will look something like in this website:
https://anthonysmoak.com/2018/08/05/how-to-dynamically-pivot-data-in-sql-server/
Thank you!