Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

moving database schema to spread sheet 1

Status
Not open for further replies.

aajay

Technical User
Oct 28, 2004
36
Hi

I have database on sql server
I would like to move database schema to excel spread sheet
any idea.
I do not like to move data at all.

thanks,
 
What do you mean move your schema? A spreadsheet is more closely related to a table if anything.
 
I would like to get tables name and all fields name in ms excel for specific database in sql server 2005
 
well, I generally use:

select * from sys.tables
select * from sys.columns

or a join of the 2 tables...

there's also others which I use quite often:
sys.procedures, sys.dm_db_partition_stats, sys.indexes...

--------------------
Procrastinate Now!
 
I would like to have like

tablename, column name

table1 column1
table1 column2
table1 column3
table1 column..n


table2 column1
table2 column2
table2 column3
table2 column..n

table3 column1
table3 column2
table3 column3
table3 column..n

table..n column1
table..n column2
table..n column3
table..n column..n

any help would be nice

thanks,







table..n column2
 
yeah,

but how to get the format I asked for
suggested method gave me list of all tables
and all columns
but how to join them

tham

 

Hi ;

For your required columns, use this query and save as text file; the result of the query.

select
B.Name as 'TableName' ,
A.name as 'Columnname'
From syscolumns A
inner join sysobjects B on A.id = B.ID

Thanks

Essa Mughal
Toronto, Canada
 
The above solution is for SQL Server 2000.

Thanks

Essa Mughal
Toronto, Canada
 
thank you very much
appreciate your time and effort

regards,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top