I have a SQL stored proc that uses a linked server and Openquery to execute a MDX query. The result returned from the MDX query is in the format of:
Month 1 | Month 2 | Month 3 | Month 4
12 5 4 7
where the columns are dynamic i.e. I never know how many months will be in the output.
How can I transpose the output into a relational format e.g.
Two columns.
Col 1 | Col 2
----- -----
Month1 12
Month2 5
Month3 4
etc etc
You’ll need to change your original MDX query from something like :
to something like this one :