SELECT b.name, c.name FROM sys.schemas a JOIN sys.all_objects b ON b.schema_id = a.schema_id JOIN sys.columns c ON c.object_id = b.object_id WHERE c.NAME LIKE '%Find Field%'
Interesting programming ideas, solutions, and logic that I have used to solve problems or have come across throughout my career.
About Me
- William Andrus
- Northglenn, Colorado, United States
- I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).
Tuesday, June 09, 2015
Find a field in SQL Server database
Tuesday, January 28, 2014
Query to help create RDL
So for a quick solution, I developed this ad hoc query that I can then use to pull the fields I would need to add from a view into the report. This ends up being a lot of copy & paste actions into the xml (view code) of the rdl.
Tuesday, July 02, 2013
Quick Reminder: How to find a field in a database, within SQL Server
t.name as table_name,
SCHEMA_NAME(schema_id) as schema_name,
c.name as column_name
from sys.tables as t
inner join sys.columns c on t.object_id = c.object_id
where c.name like '%Some Field Name%'
order by schema_name, table_name;