MwTV
MIS
- Mar 9, 2007
- 99
Don't know if this is possible.
Used the following sql script previously to obtain a "draft data dictionary" of the sql server database.
There are two separate sql server databases that are on different servers.
Is it possible for the sql script to be altered so that I can pull just one data element from each field within the tables of the sql server databases?
What I intend to accomplish is two lists that I can store in Microsoft Excel and use the data filter to determine fields that I can join in my sql scripts.
Note, a field labeled "product_id" in sql server database 1 might be labeled "item_id" in sql server database 2. Therefore, by determining the contents of the fields, I might be able to readily join the tables in my sql script.
If there is a better way, please let me know.
SELECT sysobjects.name AS
, syscolumns.name AS [Column], sysproperties.[value] AS Description
FROM (sysobjects INNER JOIN syscolumns
ON syscolumns.id = sysobjects.id) LEFT JOIN sysproperties
ON sysproperties.smallid = syscolumns.colid AND
sysproperties.id = syscolumns.id
where sysobjects.name <> 'SAMPLE'
Used the following sql script previously to obtain a "draft data dictionary" of the sql server database.
There are two separate sql server databases that are on different servers.
Is it possible for the sql script to be altered so that I can pull just one data element from each field within the tables of the sql server databases?
What I intend to accomplish is two lists that I can store in Microsoft Excel and use the data filter to determine fields that I can join in my sql scripts.
Note, a field labeled "product_id" in sql server database 1 might be labeled "item_id" in sql server database 2. Therefore, by determining the contents of the fields, I might be able to readily join the tables in my sql script.
If there is a better way, please let me know.
SELECT sysobjects.name AS
FROM (sysobjects INNER JOIN syscolumns
ON syscolumns.id = sysobjects.id) LEFT JOIN sysproperties
ON sysproperties.smallid = syscolumns.colid AND
sysproperties.id = syscolumns.id
where sysobjects.name <> 'SAMPLE'