Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object_id wild card

Status
Not open for further replies.

manmaria

Technical User
Aug 8, 2003
286
US
By executing this command

SELECT * FROM sys.views where object_id = OBJECT_ID(N'[dbo].[MyView]')

I can find the details about MyView. Is there way I can find all the views like MyV% ?

I can do this

SELECT * FROM sys.views v inner join sys.objects o on v.object_id=o.object_id WHERE
o.name like 'MyV%'

But, like to find anyother way to find list of views.

TIA

 
Code:
Select * 
From   Information_Schema.Tables 
Where  Table_Type = 'VIEW'
       And Table_Name Like 'MyV%'


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top