Crystal Reports & SQL Reporting Services Training Consultants
Account Log in:
Username:
Password:
Excellence can be obtained if you care more than others think is wise, risk more than others think is safe, dream more than others think is practical, expect more than others think is possible
 
Unknown
Institute of IT Trainers - Freelance Trainer of the Year 2006 & 2009
Liverpool Business Connect Member
  Maximum Impact Solutions Limited - Reporting Solutions, Creating Answers
Reporting Solutions - Creating Answers, Crystal Reports, Dashboarding (Xcelsius) & SQL Reporting Services

The Maximum Impact Solutions Blog Feed ME!!!!

15
July

How Do I List All the Views in an SQL Database?

Recently while working with a client they asked, how does one list all the views within an SQL database that contains a specific field name?

To find all SQL views with a specific column name:

SELECT

   TABLE_NAME, COLUMN_NAME, DATA_TYPE

FROM INFORMATION_SCHEMA.COLUMNS

WHERE TABLE_NAME in

   (SELECT name

    FROM sysobjects

    WHERE xtype = 'V')

and COLUMN_NAME like '%enter the required field name here%'

ORDER BY TABLE_NAME, COLUMN_NAME


If you have any questions, or need any assistance, please do not hesitate to Contact Us

MAKE A COMMENT

Name *

Email Address *

Comment *

To prove you are human what is:

23 + 73 =