How to execute a procedure in a View? SQL Server 2012

0

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

    
asked by luisjp 12.07.2017 в 01:14
source

0 answers