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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Create Data Dictionary

Author  Topic 

abidba
Starting Member

26 Posts

Posted - 2009-11-05 : 16:59:33
I have to create a data dictionay from a database. I have to use the folloing information:
database name
Table name
Column Name
Column Length
Column Description
Version
Constraint
Date Created

How can i achieve this using SQL Script? i did find few scripts but i need to have above information in the DD. Thanks in advance for your help.

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-05 : 18:01:56
SELECT * FROM INFORMATION_SCHEMA.Columns

Didn't we do this already?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

abidba
Starting Member

26 Posts

Posted - 2009-11-06 : 10:29:59
No i am not able to do it. Would you be able to help me out on this.
Go to Top of Page

abidba
Starting Member

26 Posts

Posted - 2009-11-09 : 15:46:24
Any body has any idea here...I need a script with the folliwing detaisl:

I want to create a data dictionary for SQL Server Database that i have.
I have created following table with folloing columns:
Table_name
Column_Name
Column_DataType
Constraint-Name
Column_Length
Column_Order
Column_Descr ---This is the column description
Table_Descr ----This is table description.
I need to create a data dictionary and import those information into this table for a database DB_Test.
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2009-11-09 : 15:53:56
what did you try so far?
Go to Top of Page

abidba
Starting Member

26 Posts

Posted - 2009-11-09 : 16:33:56
So far i have created table and wrote following script.

select SO.name as Table_Name,SC.name As Column_Name,sc.length AS Column_Length,sc.xtype,

(select [name] from systypes st where st.xusertype=SC.xtype) as [Data Type],

SC.ISNULLABLE from sysobjects SO

inner join syscolumns SC on SO.Id=SC.id

where SO.xtype='U'

order by SO.Name,colorder
Go to Top of Page

abidba
Starting Member

26 Posts

Posted - 2009-11-09 : 16:34:34
miseed one thing, have to have version as well in the table.
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2009-11-09 : 17:39:52
read about fn_listextendedproperty
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-09 : 18:08:40
[horse...water...drink]
SELECT * FROM INFORMATION_SCHEMA.Columns
[/horse...water...drink]





Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-11-09 : 18:09:49
Version...we don't need no stinkin virgin

IF you drop and create, then version would be 1



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -