Sunday, February 19, 2012

How to find a table...

Hi all,
I have a large database with many tables created by a 3rd party vendor.
I would like to be able to find which table a field belongs to without
searching through every single table. Is there some tool out there to
enable such a search?
ThanksSelect * from INFORMATION_SCHEMA.COLUMNS Where Column_Name like
'<YourColumnName>'
HTH, Jens Suessmeyer.|||To find all occurences of a *column* named "foo" use
SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME='foo'
"AGB" <andyglbl@.gmail.com> wrote in message
news:1126623946.728072.130780@.f14g2000cwb.googlegroups.com...
> Hi all,
> I have a large database with many tables created by a 3rd party vendor.
> I would like to be able to find which table a field belongs to without
> searching through every single table. Is there some tool out there to
> enable such a search?
> Thanks
>|||Here's an example, that searches for tables with a column name of 'Alias':
SELECT TABLE_SCHEMA AS TableOwner, TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME = 'Alias'
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"AGB" <andyglbl@.gmail.com> wrote in message
news:1126623946.728072.130780@.f14g2000cwb.googlegroups.com...
Hi all,
I have a large database with many tables created by a 3rd party vendor.
I would like to be able to find which table a field belongs to without
searching through every single table. Is there some tool out there to
enable such a search?
Thanks|||There is a feature in Query Analyzer for searching objects across a server
by name and/or object type. Look under the menu option Tools.. Object
Search.. New..
"AGB" <andyglbl@.gmail.com> wrote in message
news:1126623946.728072.130780@.f14g2000cwb.googlegroups.com...
> Hi all,
> I have a large database with many tables created by a 3rd party vendor.
> I would like to be able to find which table a field belongs to without
> searching through every single table. Is there some tool out there to
> enable such a search?
> Thanks
>|||hi,
All replies to this will solve the problem ... no doubt about this.
There is one interesting tool to perform such activities more in advance
SQLcompare...from redgate.
thanxs
Kishor
"AGB" wrote:

> Hi all,
> I have a large database with many tables created by a 3rd party vendor.
> I would like to be able to find which table a field belongs to without
> searching through every single table. Is there some tool out there to
> enable such a search?
> Thanks
>

No comments:

Post a Comment