How to create a filter view?

2

I created the following query in my DB, I need to create a View from this query, it should return the initial 3 columns, meta, and accumulated, according to which the select is performing, however at the moment I am performing a select in the view I should pass a where reporting the channel code, that part I am not able to create, could you help me?

    
asked by anonymous 20.08.2018 / 20:40

1 answer

3

A view does not accept parameters as a function or stored procedure , so you can not change where dynamically.

You can filter the result of a view from a select if this is not a problem (many results for example):

SELECT * 
  FROM [dbo].[VWmarcas]
 WHERE  ... 
    
20.08.2018 / 21:13