
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2014 05:03 PM
If you're like me, and SQL is not in your list of skills, you might appreciate this...
You can use this query to find a particularly obscure data field. You can run this query from within SQL Server Management Studio. Replace the word 'KEYWORD' with the data point name that are trying to find.
An example would be, you want to create a report that includes Uptime for your systems. But, you don't know what table contains that field, so you can start opening tables and scrolling through the list of fields, or you can run this...
Hope this helps
You can use this query to find a particularly obscure data field. You can run this query from within SQL Server Management Studio. Replace the word 'KEYWORD' with the data point name that are trying to find.
An example would be, you want to create a report that includes Uptime for your systems. But, you don't know what table contains that field, so you can start opening tables and scrolling through the list of fields, or you can run this...
Use lansweeperdb
GO
SELECT 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 '%KEYWORD%' /* CHANGE NAME BETWEEN THE % */
ORDER BY schema_name, table_name;
Hope this helps
Solved! Go to Solution.
Labels:
- Labels:
-
Report Center
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2015 01:07 PM
FYI for everyone: the recently added database dictionary can be used to locate specific data and fields as well.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2015 01:07 PM
FYI for everyone: the recently added database dictionary can be used to locate specific data and fields as well.
