Try this
select object_name(id) from syscolumns where name=<column name>
-----Original Message-----
From: Long, Charles (euler:eti) [mailto:Charles.[Email Address Removed] Friday, July 12, 2002 7:01 AM
To: 'Shawn Smith'; 'James Habjanetz'; [Email Address Removed] RE: Querying all tables for a specific problematic column
This will give you the table names in which a column of a particular name
appears - if that helps:
select c.name, o.name
from syscolumns c LEFT OUTER JOIN sysobjects o ON (c.id = o.id)
where c.name = 'column_name'
> -----Original Message-----
> From: Shawn Smith [SMTP:[Email Address Removed] Sent: Friday, July 12, 2002 1:49 PM
> To: 'James Habjanetz'; [Email Address Removed] Subject: Querying all tables for a specific problematic column
>
> I am having problems with a column in some of my tables. Does anyone have
> a
> query that will search all tables for this column?
> Thanks,
>
> Shawn Smith
> Database Administrator
> Fort Worth Star-Telegram
> 817-390-7094
> 817-291-5240 cell
> 817-667-2757 pager
> [Email Address Removed]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: mssqldba-[Email Address Removed] additional commands, e-mail: mssqldba-[Email Address Removed]MS Sql Server LazyDBA home page