How to return columns based on selection or add that as parameter in stored procedure

93 Views Asked by At

I am trying to capture sql server waits from dmv sys-dm-exec-requests in a stored procedure to run over time.

Later i display that in UI as a view. Currently it returns over 30 columns from the proc created which is simply selecting the data from that view.

How can i add a parameters, lets say which gives me flexibility to also make a choice in which columns user might be interested to see on dashboard?

0

There are 0 best solutions below