Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
benildusmuerling
Yak Posting Veteran
81 Posts |
Posted - 2012-05-10 : 23:37:53
|
Hi All,I've been asked to write a report, which is just a matter of a small query, which represents a number of fieldsThe past developer had a copy of the excel sheet of the report, which has the field names of it, but unfortunately not the names of the table.I have been asked to write same kind of report with different dates.Can anyone please help me in finding the name of the tables with the given fields.I would not even mind any of the system queries, which returns the table names, as well as the fields of it.Thanks,AB |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-10 : 23:41:18
|
[code]SELECT TABLE_NAME,COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS--WHERE TABLE_NAME = <tablename>[/code]add where condition if you want only details of particular table------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
benildusmuerling
Yak Posting Veteran
81 Posts |
Posted - 2012-05-10 : 23:56:56
|
vow, easy as ABC, your the BOB the builder..Thanks a Vikash, for helping the community who are like interested, shaping their skills, your services need a lot more, groom us towards an experience SQL developer and adminstrator. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-05-10 : 23:59:05
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|
|
|