Showing posts with label Sys.Views. Show all posts
Showing posts with label Sys.Views. Show all posts

Wednesday 8 March 2017

Filter or Search SQL View using SQL Query

In this article, I will explain how to filter view with containing text in the SQL server database using SQL query.  

To filter all views which contain given text in SQL server we need to write a query using SYS.VIEWS table.


DECLARE @Parameter VARCHAR(100)
SET @Parameter = 'employee'

SELECT * FROM SYS.VIEWS            
WHERE NAME LIKE '%'+ @PARAMETER +'%'  
ORDER BY MODIFY_DATE    DESC