This SQL query is my savior for a long time now. Thought I would just share it with all budding SQL developers.
Q: How to find the table(s) which contain a particular column which I know?
A: Below is the query that would do the trick.
SELECT name
FROM sys.objects
WHERE object_id IN
(
SELECT object_id
FROM sys.columns
WHERE name = [columnname] –Column which you would want to locate
)
This query will return all tables which contains the specific column. And this query also would save your time immensely.
VAIDY
select table_name from information_schema.columns where column_name = [columnname]
LikeLike
Don't forget the Tables Containing Field Lookup from the Resource Information window in the Support Debugging Tool.http://aka.ms/SDTDavidhttp://blogs.msdn.com/DevelopingForDynamicsGP/
LikeLike