Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
SQL
ce
clients
clustering
connect
datamining
datawarehouse
dts
fulltext
jdbcdriver
msde
mseq
newusers
notificationsvcs
odbc
olap
programming
replication
reportingsvcs
security
securitytools
server
setup
sqlxml.viewmapper
tools
xml
  
 
date: Fri, 9 May 2008 09:50:01 -0700,    group: microsoft.public.sqlserver.mseq        back       


Extracting the table names to which a fied is related to   
I am using a database with n tables in it. I have a set of field names with 
me. what I want is to find the names of the tables in which a particular 
field is mapped to or related to in order to find the effect of a particular 
field to the database.

Regards,
date: Fri, 9 May 2008 09:50:01 -0700   author:   Jatin Gulati Jatin

Re: Extracting the table names to which a fied is related to   
On Fri, 9 May 2008 09:50:01 -0700, Jatin Gulati <Jatin
Gulati@discussions.microsoft.com> wrote:

>I am using a database with n tables in it. I have a set of field names with 
>me. what I want is to find the names of the tables in which a particular 
>field is mapped to or related to in order to find the effect of a particular 
>field to the database.

Hi Jatin,

SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME
FROM   INFORMATION_SCHEMA.COLUMNS
WHERE  COLUMN_NAME = 'Name of column you need';

-- 
Hugo Kornelis, SQL Server MVP
My SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
date: Mon, 12 May 2008 00:23:51 +0200   author:   Hugo Kornelis LID

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us