In my Procedure
a dynamic query is executed (use PIVOT
) where the last columns are dynamic, so when I want to create the view I have tried to use Openquery
and OPENROWSET
but always shows the same message.
You can not recognize the metadata and you need to use
WITH RESULT SETS
in the procedure.Using the latter is not possible since the columns may vary.
Any ideas?
Thanks